mirror of
https://github.com/cisagov/log4j-affected-db.git
synced 2024-11-23 00:50:48 +00:00
Merge pull request #22 from cisagov/improvement/action_cache
Add GitHub action caching of pre-commit hooks and pip packages.
This commit is contained in:
commit
10bbfdf3ae
1 changed files with 17 additions and 2 deletions
19
.github/workflows/build.yml
vendored
19
.github/workflows/build.yml
vendored
|
@ -5,9 +5,7 @@ on: [push]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
|
|
||||||
|
@ -16,6 +14,23 @@ jobs:
|
||||||
with:
|
with:
|
||||||
python-version: 3.7
|
python-version: 3.7
|
||||||
|
|
||||||
|
- name: Cache pre-commit hooks
|
||||||
|
uses: actions/cache@v1
|
||||||
|
with:
|
||||||
|
path: ~/.cache/pre-commit
|
||||||
|
key: "${{ runner.os }}-pre-commit-\
|
||||||
|
${{ hashFiles('**/.pre-commit-config.yaml') }}"
|
||||||
|
|
||||||
|
- name: Cache pip test requirements
|
||||||
|
uses: actions/cache@v1
|
||||||
|
with:
|
||||||
|
path: ~/.cache/pip
|
||||||
|
key: "${{ runner.os }}-pip-test-\
|
||||||
|
${{ hashFiles('**/requirements-test.txt') }}"
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-pip-test-
|
||||||
|
${{ runner.os }}-pip-
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
|
|
Loading…
Reference in a new issue