-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (46 loc) · 1.42 KB
/
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
42
43
44
45
46
47
48
49
name: test
on:
pull_request:
paths-ignore:
- 'doc/**'
- 'README.md'
- 'CHANGELOG.md'
- 'TODO.md'
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
tests:
name: unittests python-${{ matrix.python-version }} ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version:
- "3.7"
- "3.11"
os:
# not latest because this is last version that supports python-3.7
- ubuntu-22.04
- windows-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install Poetry
run: pipx install git+https://github.com/python-poetry/poetry.git@5bab98c9500f1050c6bb6adfb55580a23173f18d
- name: Install Python ${{ matrix.python-version }}
id: setup-python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
update-environment: false
- run: poetry env use ${{ steps.setup-python.outputs.python-path }}
- run: poetry install --extras "dev" --no-interaction --no-cache -vvv
- run: poetry run pytest ./tests
name: run pytest (all)
if: ${{ !github.event.pull_request.draft }}
- run: poetry run pytest ./tests -m "not slow"
name: run pytest (not slow)
if: ${{ github.event.pull_request.draft }}