-
Notifications
You must be signed in to change notification settings - Fork 17
45 lines (36 loc) · 1.06 KB
/
coverage.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
name: Test coverage
on:
workflow_dispatch:
push:
branches: [master]
pull_request:
branches:
- "**"
env:
PYTHON_VERSION: "3.8"
jobs:
codecov:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Poetry
run: pipx install poetry
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
cache: "poetry"
- name: Install dependencies
run: |
poetry config virtualenvs.in-project true
poetry install
- name: Generate report
run: |
export PYTHONPATH=$PWD
poetry run coverage run --parallel-mode --source flexmock tests/test_unittest.py
poetry run coverage run --parallel-mode --source flexmock tests/test_doctest.py
poetry run coverage run --parallel-mode --source flexmock -m pytest
poetry run coverage combine
poetry run coverage xml
- name: Upload report to Codecov
uses: codecov/codecov-action@v4