Use alls-green to check all tests have passed #583
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
| name: Tests | |
| on: pull_request | |
| jobs: | |
| ruff: | |
| name: Ruff Check & Format | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Install Ruff | |
| run: pip3 install ruff==0.6.7 # Must match version pinned in .pre-commit.yaml | |
| - run: ruff check | |
| - run: ruff format --check | |
| typecheck: | |
| name: MyPy Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: citizensadvice/python-poetry-setup-action@v1 | |
| with: | |
| python_version: 3.12 | |
| - name: Run type check | |
| run: poetry run mypy . | |
| pytest: | |
| name: Testing on python ${{ matrix.python_version }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python_version: ["3.10", "3.11", "3.12", "3.13"] | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: citizensadvice/python-poetry-setup-action@v1 | |
| with: | |
| python_version: ${{ matrix.python_version }} | |
| - name: Run tests | |
| run: poetry run pytest -vv | |
| checks-successful: | |
| name: All Checks Passed | |
| runs-on: ubuntu-latest | |
| if: always() | |
| needs: [ruff, typecheck, pytest] | |
| steps: | |
| - uses: re-actors/alls-green@v1.2.2 | |
| with: | |
| jobs: ${{ toJSON(needs) }} |