diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2c9d827..2d64a7c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,14 +40,7 @@ jobs: with: python-version: ${{ matrix.python-version }} - - uses: actions/cache@v3 - id: cache - with: - path: ${{ env.pythonLocation }} - key: v2-${{ runner.os }}-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}-${{ hashFiles('requirements/tests.txt') }} - - run: pip install -r requirements/tests.txt -r requirements/pyproject.txt - if: steps.cache.outputs.cache-hit != 'true' - run: make test @@ -68,14 +61,7 @@ jobs: with: python-version: '3.10' - - uses: actions/cache@v3 - id: cache - with: - path: ${{ env.pythonLocation }} - key: ${{ env.pythonLocation }}-${{ hashFiles('requirements/linting.txt') }}-${{ hashFiles('pyproject.toml') }} - - run: pip install -r requirements/linting.txt - if: steps.cache.outputs.cache-hit != 'true' - uses: pre-commit/action@v3.0.0 with: @@ -109,11 +95,20 @@ jobs: name: docs path: site + check: # This job does nothing and is only used for the branch protection + if: always() + needs: [lint, test, docs] + runs-on: ubuntu-latest + + steps: + - name: Decide whether the needed jobs succeeded or failed + uses: re-actors/alls-green@release/v1 + id: all-green + with: + jobs: ${{ toJSON(needs) }} + deploy: - needs: - - test - - lint - - docs + needs: [check] if: "success() && startsWith(github.ref, 'refs/tags/')" runs-on: ubuntu-latest