-
Notifications
You must be signed in to change notification settings - Fork 6
79 lines (68 loc) · 1.78 KB
/
tests.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: Tests
on:
push:
branches: [main, features]
pull_request:
branches: [main, features]
workflow_dispatch:
jobs:
tests:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-11.0
- windows-latest
python_version:
- '3.8'
- '3.9'
- '3.10'
- '3.11'
- '3.12'
name: Python ${{ matrix.python_version }} (${{ matrix.os }})
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python_version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python_version }}
architecture: x64
- name: Prepare environment
run: |
python3 -m pip install --upgrade pip poetry
- name: Install dependencies
env:
PIP_PREFER_BINARY: 1
run: |
python3 -m poetry install --with=dev
- name: Run doc tests
run: |
make coverage-doctests
- name: Push code coverage
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_PARALLEL: true
COVERALLS_FLAG_NAME: "Py${{ matrix.python_version }}_${{ matrix.os }}"
run: |
python3 -m poetry run coveralls --service=github
coverage:
name: Push coverage report
needs: tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Prepare Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install dependencies
run: |
pip install -U pip poetry
poetry install
- name: Upload coverage report
run: |
poetry run coveralls --finish --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}