-
Notifications
You must be signed in to change notification settings - Fork 21
65 lines (65 loc) · 2.16 KB
/
poetry.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
name: Tests
on:
push:
branches: [ master, 'stable/*' ]
pull_request:
branches: [ master, 'stable/*' ]
jobs:
tests:
name: tests-python${{ matrix.python-version }}-${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']
poetry-version: [1.5.1]
os: ["ubuntu-latest"]
steps:
- uses: actions/checkout@v3
- name: Install poetry
uses: abatilo/actions-poetry@v2
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: "poetry"
- name: Check Poetry lock file status
run: poetry lock --check
- name: Check shell scripts
uses: ludeeus/[email protected]
- name: Install coverage tool
run: |
poetry run pip install coverage[toml]
- name: Install examples dependencies (Py3.11)
run: |
poetry install --only main --extras examples
# tweedledum has no wheel for Python3.11 and the build errors
if: matrix.python-version == '3.11'
- name: Install examples dependencies (~Py3.11)
run: |
poetry install --only main --all-extras
if: matrix.python-version != '3.11'
- name: Run examples
run: |
poetry run examples/run_all.sh -c
- name: Install all dependencies
run: poetry install --sync
- name: Check version numbers consistency
run: poetry run poe version_check
- name: Check formatting
run: poetry run poe format_check
- name: Linting
run: poetry run poe lint
- name: Type checking
run: poetry run poe typecheck
- name: Testing
run: poetry run poe test --cov_opts="-a" # add to examples coverage
- name: Docs
run: poetry run poe docs
- name: Generate coverage report
run: poetry run coverage lcov -o coverage.lcov
- name: Upload coverage report
uses: coverallsapp/github-action@v2
with:
file: coverage.lcov