Skip to content

Commit

Permalink
Rename cache keys
Browse files Browse the repository at this point in the history
  • Loading branch information
HAEKADI committed Oct 20, 2021
1 parent 8e0b557 commit 85e2a9e
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,18 @@ jobs:
uses: actions/cache@v2
with:
path: ${{ env.pythonLocation }}
key: ${{ env.pythonLocation }}-build-${{ hashFiles('setup.py') }}-${{ github.sha }} # Cache the entire build Python environment
key: build-${{ env.pythonLocation }}${{ hashFiles('setup.py') }}-${{ github.sha }}
restore-keys: |
${{ env.pythonLocation }}-build-${{ hashFiles('setup.py') }}
${{ env.pythonLocation }}-build-
build-${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}
build-${{ env.pythonLocation }}-
- name: Build package
run: make build
- name: Cache build release
id: restore-build-release
- name: Cache release
id: restore-release
uses: actions/cache@v2
with:
path: dist
key: ${{ env.pythonLocation }}-build-release-${{ hashFiles('setup.py') }}-${{ github.sha }}
key: release-${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}-${{ github.sha }}

test-core:
runs-on: ubuntu-latest
Expand All @@ -44,7 +44,7 @@ jobs:
uses: actions/cache@v2
with:
path: ${{ env.pythonLocation }}
key: ${{ env.pythonLocation }}-build-${{ hashFiles('setup.py') }}-${{ github.sha }}
key: build-${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}-${{ github.sha }}
- name: Build package
run: make build
- name: Run Core tests
Expand All @@ -64,7 +64,7 @@ jobs:
uses: actions/cache@v2
with:
path: ${{ env.pythonLocation }}
key: ${{ env.pythonLocation }}-build-${{ hashFiles('setup.py') }}-${{ github.sha }}
key: build-${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}-${{ github.sha }}
- name: Check NumPy typing against latest 3 minor versions
run: for i in {1..3}; do VERSION=$(${GITHUB_WORKSPACE}/.github/get-numpy-version.py prev) && pip install numpy==$VERSION && make check-types; done

Expand All @@ -82,7 +82,7 @@ jobs:
uses: actions/cache@v2
with:
path: ${{ env.pythonLocation }}
key: ${{ env.pythonLocation }}-build-${{ hashFiles('setup.py') }}-${{ github.sha }}
key: build-${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}-${{ github.sha }}
- name: Run Country Template tests
run: |
COUNTRY_TEMPLATE_PATH=`python -c "import openfisca_country_template; print(openfisca_country_template.CountryTaxBenefitSystem().get_package_metadata()['location'])"`
Expand All @@ -104,13 +104,13 @@ jobs:
uses: actions/cache@v2
with:
path: ${{ env.pythonLocation }}
key: ${{ env.pythonLocation }}-build-${{ hashFiles('setup.py') }}-${{ github.sha }}
key: build-${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}-${{ github.sha }}
- name: Cache docs
id: restore-docs
uses: actions/cache@v2
with:
path: ${{ env.pythonLocation }}
key: ${{ github.ref }}${{ env.pythonLocation }}-docs-${{ hashFiles('doc/requirements.txt') }}
key: docs-${{ env.pythonLocation }}-${{ hashFiles('doc/requirements.txt') }}--${{ github.sha }}
- name: Install dependencies
run: make test-doc-install
- name: Run doc tests
Expand All @@ -132,7 +132,7 @@ jobs:
uses: actions/cache@v2
with:
path: ${{ env.pythonLocation }}
key: ${{ env.pythonLocation }}-build-${{ hashFiles('setup.py') }}-${{ github.sha }}
key: build-${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}-${{ github.sha }}
- run: make check-syntax-errors
- run: make check-style
- name: Lint Python files
Expand All @@ -158,7 +158,7 @@ jobs:
uses: actions/cache@v2
with:
path: ${{ env.pythonLocation }}
key: ${{ env.pythonLocation }}-build-${{ hashFiles('setup.py') }}-${{ github.sha }}
key: build-${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}-${{ github.sha }}
- name: Submit coverage to Coveralls
run: |
pip install coveralls
Expand Down Expand Up @@ -214,13 +214,13 @@ jobs:
uses: actions/cache@v2
with:
path: ${{ env.pythonLocation }}
key: ${{ env.pythonLocation }}-build-${{ hashFiles('setup.py') }}-${{ github.sha }}
- name: Cache build release
id: restore-build-release
key: build-${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}-${{ github.sha }}
- name: Cache release
id: restore-release
uses: actions/cache@v2
with:
path: dist
key: ${{ env.pythonLocation }}-build-release-${{ hashFiles('setup.py') }}-${{ github.sha }}
key: release-${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}-${{ github.sha }}
- name: Upload a Python package to PyPi
run: twine upload dist/* --username $PYPI_USERNAME --password $PYPI_PASSWORD
- name: Publish a git tag
Expand Down

0 comments on commit 85e2a9e

Please sign in to comment.