-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (37 loc) · 1.06 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
name: Tests
on:
pull_request:
branches:
- main
paths-ignore:
- 'docs/**'
- '*.md'
- '*.rst'
jobs:
tests:
name: "Python ${{ matrix.python-version }}"
runs-on: "ubuntu-latest"
strategy:
matrix:
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
python-version: ["3.11"]
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: "Configure poetry"
run: "poetry config virtualenvs.create false --local"
- name: "Run poetry update"
run: "poetry update"
- name: "Run tests"
run: "poetry run pytest"