1
0
Fork 0
mirror of https://github.com/cisagov/log4j-affected-db.git synced 2024-11-25 18:00:48 +00:00

Merge pull request #62 from cisagov/improvement/clean_up_actions/cache

Improve actions/cache Configuration
This commit is contained in:
Nick M 2020-12-03 10:18:06 -05:00 committed by GitHub
commit df674df714
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -20,22 +20,20 @@ jobs:
uses: actions/setup-python@v2 uses: actions/setup-python@v2
with: with:
python-version: 3.9 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: with:
path: | path: |
${{ env.PIP_CACHE_DIR }} ${{ env.PIP_CACHE_DIR }}
${{ env.PRE_COMMIT_CACHE_DIR }} ${{ env.PRE_COMMIT_CACHE_DIR }}
key: | key: "${{ env.BASE_CACHE_KEY }}\
lint-${{ runner.os }}-\
py${{ steps.setup-python.outputs.python-version }}-\
${{ hashFiles('**/requirements-test.txt') }}-\ ${{ hashFiles('**/requirements-test.txt') }}-\
${{ hashFiles('**/requirements.txt') }}-\ ${{ hashFiles('**/requirements.txt') }}-\
${{ hashFiles('**/.pre-commit-config.yaml') }}" ${{ hashFiles('**/.pre-commit-config.yaml') }}"
restore-keys: | restore-keys: |
lint-${{ runner.os }}-\ ${{ env.BASE_CACHE_KEY }}
py${{ steps.setup-python.outputs.python-version }}-
lint-${{ runner.os }}-
- name: Install dependencies - name: Install dependencies
run: | run: |
python -m pip install --upgrade pip python -m pip install --upgrade pip