refactor: Simplify caching steps in CI workflow and remove redundant cache for test dependencies
This commit is contained in:
@@ -12,24 +12,17 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
python-version: "3.10"
|
python-version: "3.10"
|
||||||
- name: Cache pip
|
- name: Cache pip
|
||||||
uses: actions/cache@v4
|
uses: https://github.com/actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: ~/.cache/pip
|
path: ~/.cache/pip
|
||||||
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
|
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-pip-
|
${{ runner.os }}-pip-
|
||||||
${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
|
|
||||||
- name: Cache pip test dependencies
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: ~/.cache/pip
|
|
||||||
key: ${{ runner.os }}-pip-test-${{ hashFiles('requirements-test.txt') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-pip-test-
|
|
||||||
${{ runner.os }}-pip-test-${{ hashFiles('requirements-test.txt') }}
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
pip install -r requirements.txt
|
pip install -r requirements.txt
|
||||||
pip install -r requirements-test.txt
|
pip install -r requirements-test.txt
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
|
env:
|
||||||
|
DATABASE_URL: sqlite:///./test_calminer.db
|
||||||
run: pytest
|
run: pytest
|
||||||
|
|||||||
Reference in New Issue
Block a user