-
Notifications
You must be signed in to change notification settings - Fork 3
41 lines (40 loc) · 1.11 KB
/
ci.yaml
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
name: Tests
on:
pull_request:
branches:
- main
paths-ignore:
- 'docs/**'
- '*.md'
- '*.rst'
jobs:
tests:
name: "Python ${{ matrix.python-version }}"
runs-on: "ubuntu-latest"
env:
CODECOV_UPLOAD: false
PIPX_VERSION: "0.16.4"
POETRY_VERSION: "1.1.14"
PYPI_PUBLISH: false
strategy:
matrix:
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
python-version: ["3.7", "3.8", "3.9", "3.10"]
steps:
- uses: "actions/checkout@v3"
- uses: "actions/setup-python@v4"
with:
python-version: "${{ matrix.python-version }}"
- name: Set up Poetry cache for Python dependencies
uses: actions/cache@v3
if: startsWith(runner.os, 'Linux')
with:
path: ~/.cache/pypoetry
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}
restore-keys: ${{ runner.os }}-poetry-
- name: "Install poetry"
run: "pip install poetry"
- name: "Run poetry update"
run: "poetry update"
- name: "Run tests"
run: "poetry run pytest"