-
-
Notifications
You must be signed in to change notification settings - Fork 20
58 lines (52 loc) · 1.51 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
50
51
52
53
54
55
56
57
58
name: Test
on:
pull_request:
paths-ignore:
- 'doc/**'
- 'README.md'
- 'LICENSE'
jobs:
test:
strategy:
fail-fast: true
matrix:
os: [Ubuntu, macOS, Windows]
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
include:
- os: Ubuntu
image: ubuntu-22.04
- os: Windows
image: windows-2022
- os: macOS
image: macos-12
name: ${{ matrix.os }} / ${{ matrix.python-version }} ${{ matrix.suffix }}
runs-on: ${{ matrix.image }}
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Setup venv
run: python -m venv env
- name: Test on Windows
if: matrix.os == 'Windows'
run: |
env\Scripts\Activate.ps1
pip install poetry pytest-github-actions-annotate-failures
poetry install --all-extras
coverage run -m pytest -v test/
- name: Test on UNIX
if: matrix.os != 'Windows'
run: |
source env/bin/activate
pip install poetry pytest-github-actions-annotate-failures
poetry install --all-extras
coverage run -m pytest -v test/
- name: Coverage & codecov
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: |
pip install codecov
coverage report
codecov