-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (48 loc) · 1.47 KB
/
ci.yaml
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
name: CI
on:
push:
branches:
- main
permissions: write-all
jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.11.5
uses: actions/setup-python@v4
with:
python-version: "3.11.5"
- name: Setup Poetry
uses: abatilo/actions-poetry@v2.1.6
with:
poetry-version: "1.6.1"
- name: Install dependencies
run: poetry install
- name: Check format
run: |
poetry run task check_format
- name: Check lint
run: |
poetry run task lint
- name: Check mypy
run: poetry run task mypy
- name: Run unittests with coverage check
run: |
poetry run pytest --cov --junitxml=pytest.xml --cov-report=term-missing:skip-covered | tee pytest-coverage.txt
- name: Create Coverage Comment
id: coverageComment
uses: MishaKav/pytest-coverage-comment@main
with:
pytest-coverage-path: pytest-coverage.txt
junitxml-path: ./pytest.xml
- name: Create Coverage Badge
uses: schneegans/dynamic-badges-action@v1.7.0
with:
auth: ${{ secrets.BADGE_GIST }}
gistID: 39e7ad55fb0943a43d055782915a2024
filename: pytest-coverage-comment.json
label: Coverage
message: ${{ steps.coverageComment.outputs.coverage }}
color: ${{ steps.coverageComment.outputs.color }}
namedLogo: python