-
Notifications
You must be signed in to change notification settings - Fork 2
52 lines (41 loc) · 1.05 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
52
name: CI Pipeline
on:
push:
branches:
- main
- develop
pull_request:
branches:
- main
- develop
permissions:
contents: write
checks: write
pull-requests: write
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10']
steps:
- name: Check out the repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install project with dev dependencies
run: |
python -m pip install --upgrade pip
pip install .[dev,tests]
- name: Run Black (auto-reformat)
run: black .
- name: Run isort (auto-reformat)
run: isort .
- name: Run pytest and generate coverage report
run: pytest --cov-report=term-missing:skip-covered --cov=codes test/ | tee pytest-coverage.txt
- name: Pytest coverage comment
uses: MishaKav/pytest-coverage-comment@main
with:
pytest-coverage-path: ./pytest-coverage.txt