Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add check job to CI, remove caching #62

Merged
merged 1 commit into from
Apr 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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