Cache pip before install and fix cache key expansion (#12)
Moves the actions/cache step ahead of the install step and uses the runner.os Actions expression in the cache key. Closes #8 Reviewed-on: #12 Co-authored-by: Lyra Thorpe <iam@emmathe.dev> Co-committed-by: Lyra Thorpe <iam@emmathe.dev>
This commit was merged in pull request #12.
This commit is contained in:
@@ -45,16 +45,16 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
python-version: 3.12
|
python-version: 3.12
|
||||||
|
|
||||||
- name: Install test dependencies
|
|
||||||
run: python -m pip install --upgrade pip && pip install -r requirements-dev.txt
|
|
||||||
|
|
||||||
- name: Cache pip dependencies
|
- name: Cache pip dependencies
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: ~/.cache/pip
|
path: ~/.cache/pip
|
||||||
key: "$RUNNER_OS-pip-${{ hashFiles('requirements-dev.txt') }}"
|
key: "${{ runner.os }}-pip-${{ hashFiles('requirements-dev.txt') }}"
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
$RUNNER_OS-pip-
|
${{ runner.os }}-pip-
|
||||||
|
|
||||||
|
- name: Install test dependencies
|
||||||
|
run: python -m pip install --upgrade pip && pip install -r requirements-dev.txt
|
||||||
|
|
||||||
- name: Run unit tests
|
- name: Run unit tests
|
||||||
run: python -m pytest -q
|
run: python -m pytest -q
|
||||||
|
|||||||
Reference in New Issue
Block a user