Skip to content

Commit 2d63f8b

Browse files
committed
github workflows
1 parent 281c81c commit 2d63f8b

1 file changed

Lines changed: 15 additions & 5 deletions

File tree

.github/workflows/run-tests.yml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,27 @@ jobs:
1212
python-version: ["3.8", "3.9", "3.10", "3.11"]
1313

1414
steps:
15-
- uses: actions/checkout@v2
15+
- uses: actions/checkout@v4
1616
with:
1717
submodules: recursive
1818
- name: Set up Python ${{ matrix.python-version }}
19-
uses: actions/setup-python@v2
19+
uses: actions/setup-python@v5
2020
with:
2121
python-version: ${{ matrix.python-version }}
22-
- name: Install dependencies
22+
- name: Install poetry
23+
uses: abatilo/actions-poetry@v4
24+
- name: Setup a local virtual environment (if no poetry.toml file)
2325
run: |
24-
poetry install
25-
poetry build
26+
poetry config virtualenvs.create true --local
27+
poetry config virtualenvs.in-project true --local
28+
- uses: actions/cache@v3
29+
name: Define a cache for the virtual environment based on the dependencies lock file
30+
with:
31+
path: ./.venv
32+
key: venv-${{ hashFiles('poetry.lock') }}
33+
- name: Install the project dependencies
34+
run: poetry install
35+
2636
- name: Test with pytest
2737
run: |
2838
./scripts/sync-tests

0 commit comments

Comments
 (0)