-
Notifications
You must be signed in to change notification settings - Fork 5
56 lines (48 loc) · 1.46 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
name: Tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
tests:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ] # , macos-latest, windows-latest ]
python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12" ]
env:
OS: ${{ matrix.os }}
PYTHON: ${{ matrix.python-version }}
name: Python ${{ matrix.python-version }} on OS ${{ matrix.os }}
# https://github.com/actions/setup-python/issues/374#issuecomment-1088938718
steps:
- name: Acquire sources
uses: actions/checkout@v4
- name: Install Graphviz
uses: ts-graphviz/setup-graphviz@v1
- name: Install Poetry
run: pipx install poetry
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: x64
cache: 'poetry'
- name: Install program with dependencies
run: |
poetry env use "${{ matrix.python-version }}"
poetry install --no-interaction
- name: Run tests, with coverage report
run: |
poetry run poe coverage
poetry run coverage xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
flags: unittests
env_vars: OS,PYTHON
name: codecov-umbrella
fail_ci_if_error: false