-
Notifications
You must be signed in to change notification settings - Fork 2
52 lines (51 loc) · 1.54 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
name: Test
on:
push:
branches: [ "*" ]
pull_request:
branches: [ "*" ]
workflow_dispatch:
jobs:
test:
strategy:
matrix:
os: [ 'ubuntu-20.04' ]
python-version: [ '3.9', '3.10', '3.11' ]
poetry-version: [ '1.3' ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: abatilo/[email protected]
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Install dependencies
run: poetry install
- name: Run formatter, linter and type checker
run: |
poetry run mypy --explicit-package-bases .
poetry run ruff check .
- name: Run unit tests
run: poetry run pytest --cov=sigma --cov-report term --cov-report lcov:coverage.lcov -vv
- name: Submit coverage report to Coveralls
if: ${{ success() }}
uses: coverallsapp/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./coverage.lcov
parallel: true
flag-name: python-${{ matrix.python-version }}
finish:
needs: test
runs-on: ubuntu-20.04
steps:
- name: Finish coveralls
uses: coverallsapp/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true
carryforward: "python-3.9,python-3.10,python-3.11"