forked from sb2nov/week1-devops
-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (31 loc) · 886 Bytes
/
code_cov.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
name: test
on:
pull_request:
branches:
- "*"
jobs:
test:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: Check out repo code
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v3
with:
python-version: "3.x"
- name: Install Dependencies
run: |
python -m pip install -r requirements.txt
- name: Run tests
run: |
python -m pytest -v tests
- name: Run coverage tests
run: |
pytest --junitxml=pytest.xml --cov-report=term-missing:skip-covered --cov=calculator tests/ | tee pytest-coverage.txt
- name: Pytest coverage comment
uses: MishaKav/pytest-coverage-comment@main
with:
pytest-coverage-path: ./pytest-coverage.txt
junitxml-path: ./pytest.xml