Skip to content

Commit

Permalink
Merge pull request #62 from cisagov/improvement/clean_up_actions/cache
Browse files Browse the repository at this point in the history
Improve actions/cache Configuration
  • Loading branch information
mcdonnnj committed Dec 3, 2020
2 parents 3b312c4 + f4131e5 commit df674df
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions .github/workflows/build.yml
Expand Up @@ -20,22 +20,20 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Cache linting environments
uses: actions/cache@v2
- uses: actions/cache@v2
env:
BASE_CACHE_KEY: "${{ github.job }}-${{ runner.os }}-\
py${{ steps.setup-python.outputs.python-version }}-"
with:
path: |
${{ env.PIP_CACHE_DIR }}
${{ env.PRE_COMMIT_CACHE_DIR }}
key: |
lint-${{ runner.os }}-\
py${{ steps.setup-python.outputs.python-version }}-\
key: "${{ env.BASE_CACHE_KEY }}\
${{ hashFiles('**/requirements-test.txt') }}-\
${{ hashFiles('**/requirements.txt') }}-\
${{ hashFiles('**/.pre-commit-config.yaml') }}"
restore-keys: |
lint-${{ runner.os }}-\
py${{ steps.setup-python.outputs.python-version }}-
lint-${{ runner.os }}-
${{ env.BASE_CACHE_KEY }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down

0 comments on commit df674df

Please sign in to comment.