Skip to content

Commit

Permalink
add check job to ci, remove caching
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelcolvin committed Apr 27, 2023
1 parent cd2eedd commit b16e7c7
Showing 1 changed file with 13 additions and 18 deletions.
31 changes: 13 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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:
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit b16e7c7

Please sign in to comment.