-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (33 loc) · 948 Bytes
/
code-coverage-workflow.yml
File metadata and controls
34 lines (33 loc) · 948 Bytes
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
name: Code Coverage
on:
push:
branches:
- 'main'
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip
run: |
python -m pip install --upgrade pip
- name: Install from setup.py
run: |
python -m pip install .
- name: Install test requirements
run: |
python -m pip install -r requirements-test.txt
- name: Test and generate coverage report
run: |
python -m pytest --cov=modifiable_items_dictionary --cov-report=xml --doctest-modules
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos