-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (39 loc) · 1.12 KB
/
tests.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
name: Run Unit Test via Pytest
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11"]
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Setup environment
run: |
python -m pip install --upgrade pip
pip install poetry
poetry config virtualenvs.in-project true
- name: Install dependencies
run: poetry install --with tests
- name: Test with pytest
run: |
poetry run coverage run -m pytest -v -s
- name: Generate coverage report
run: |
poetry run coverage report -m
- name: Export coverage report
run: |
poetry run coverage xml -o report.xml
- name: Code Coverage Report
uses: irongut/CodeCoverageSummary@v1.3.0
with:
filename: report.xml
format: markdown
indicators: true
output: both
- name: Write summary
run: cat code-coverage-results.md >> $GITHUB_STEP_SUMMARY