-
Notifications
You must be signed in to change notification settings - Fork 15
48 lines (46 loc) · 1.44 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
name: CI tests
on: [push, pull_request]
jobs:
docs:
runs-on: ubuntu-22.04
steps:
- run: pipx install poetry
- uses: actions/checkout@v3
- run: poetry install --only=docs
- run: poetry run make -C docs/ html
lint:
runs-on: ubuntu-22.04
steps:
- run: pipx install poetry
- uses: actions/checkout@v3
- run: poetry install --only=lint
- run: poetry run flake8 --show-source
id: flake8
- run: poetry run black --check --diff .
id: black
if: success() || steps.flake8.conclusion == 'failure'
- run: poetry run isort --check --diff .
id: isort
if: success() || steps.flake8.conclusion == 'failure' || steps.black.conclusion == 'failure'
test:
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: [ '3.10', '3.11', '3.12' ]
steps:
- run: pipx install poetry
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- uses: actions/checkout@v3
- run: poetry install --only=main --only=test
- run: poetry run pytest
if: matrix.python-version != '3.10'
- run: poetry run coverage run
if: matrix.python-version == '3.10'
- run: poetry run coverage xml
if: matrix.python-version == '3.10'
- uses: coverallsapp/github-action@v2
if: matrix.python-version == '3.10'
with:
file: coverage.xml