Bump to 0.2.160 #1490
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This is a basic workflow to help you get started with Actions | |
| name: Code Quality | |
| # Controls when the action will run. | |
| on: | |
| # Triggers the workflow on push or pull request events but only for the master branch | |
| push: | |
| branches: [ master, main ] | |
| paths-ignore: # dont run all this workflow if only the dependencies are changed as we do a lock in dependencies | |
| - 'pyproject.toml' | |
| - 'poetry.lock' | |
| pull_request: | |
| branches: [ master, main ] | |
| paths-ignore: # dont run all this workflow if only the dependencies are changed as we do a lock in dependencies | |
| - 'pyproject.toml' | |
| - 'poetry.lock' | |
| # Allows you to run this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| # A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
| jobs: | |
| check: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: | |
| - "3.11" | |
| - "3.12" | |
| - "3.10" | |
| poetry-version: ["2.0.1"] | |
| os: | |
| - ubuntu-22.04 | |
| - macos-latest # needs to be pinned | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install and configure Poetry | |
| uses: snok/install-poetry@v1 | |
| with: | |
| version: ${{ matrix.poetry-version }} | |
| virtualenvs-create: true | |
| installer-parallel: true | |
| - name: Install Adev | |
| run: | | |
| make -d install | |
| - name: Format | |
| run: | | |
| poetry run adev -n 0 fmt -p auto_dev || poetry run adev -n 0 -v fmt -p auto_dev | |
| poetry run adev -n 0 fmt -p tests || poetry run adev -n 0 -v fmt -p tests | |
| - name: Lint | |
| run: | | |
| poetry run adev -n 0 lint -p auto_dev || poetry run adev -n 0 -v lint -p auto_dev | |
| poetry run adev -n 0 lint -p tests || poetry run adev -n 0 -v lint -p tests | |
| - name: Tests | |
| run: | | |
| git config --global user.name "CI" | |
| git config --global user.email "ci@station.codes" | |
| poetry run adev -v test -p tests || poetry run adev -v test -p tests | |
| - name: Docs | |
| run: | | |
| poetry run python scripts/generate_command_docs.py | |
| poetry run mkdocs build --strict | |
| - name: Pytest coverage comment | |
| uses: MishaKav/pytest-coverage-comment@main | |
| with: | |
| pytest-coverage-path: ./coverage-report.txt | |
| release_on_main: | |
| runs-on: ubuntu-latest | |
| needs: check # Ensures this job only runs after the "check" job is completed successfully | |
| if: github.ref == 'refs/heads/main' && !contains(github.event.head_commit.message, 'Bump to ') # Optional condition to skip some commits | |
| permissions: | |
| contents: write # Allows modifying repository content (including workflows | |
| actions: write | |
| checks: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install and configure Poetry | |
| uses: snok/install-poetry@v1 | |
| with: | |
| version: 2.0.1 | |
| virtualenvs-create: true | |
| installer-parallel: true | |
| - name: Install Adev | |
| run: | | |
| make install | |
| # - name: Run release if on main | |
| # env: | |
| # GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
| # run: | | |
| # git config --global user.name "CI" | |
| # git config --global user.email "ci@station.codes" | |
| # poetry run adev release --auto-approve |