-
Notifications
You must be signed in to change notification settings - Fork 3
41 lines (34 loc) · 1.1 KB
/
poetry-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions using Poetry
name: poetry-test
on:
pull_request:
branches: [ "master" ]
jobs:
ci:
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
# Cache the installation of Poetry itself. This prevents the workflow
# from installing Poetry every time, which can be slow
- name: Cache poetry install
uses: actions/cache@v4
with:
path: ~/.local
key: poetry-1.8.2-0
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.8.2
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- name: Install project dependencies
run: poetry install --no-interaction
- name: Run tests
run: poetry run pytest -v