Cache dependencies in CI (#832)
This commit is contained in:
13
.github/workflows/ci.yml
vendored
13
.github/workflows/ci.yml
vendored
@@ -19,9 +19,20 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
- name: Install poetry
|
- name: Install poetry
|
||||||
run: pip install poetry==1.4.2
|
uses: snok/install-poetry@v1
|
||||||
|
with:
|
||||||
|
version: 1.4.2
|
||||||
|
virtualenvs-create: true
|
||||||
|
virtualenvs-in-project: true
|
||||||
|
- name: Load cached venv
|
||||||
|
id: cached-poetry-dependencies
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: .venv
|
||||||
|
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: poetry install --all-extras
|
run: poetry install --all-extras
|
||||||
|
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
|
||||||
- name: Lint with ruff
|
- name: Lint with ruff
|
||||||
run: make lint
|
run: make lint
|
||||||
- name: Run tests and generate coverage report
|
- name: Run tests and generate coverage report
|
||||||
|
|||||||
Reference in New Issue
Block a user