-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (34 loc) · 933 Bytes
/
test.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
name: Test
on:
pull_request:
push:
branches:
- master
jobs:
test:
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install dependencies
run: |
sudo apt update
sudo apt install python3 python3-pip -y
pip3 install pytest pytest-cov pytest-mock pytest-xdist codecov
- name: Run tests
run: |
pytest --verbose --cov-report term-missing --cov=pi_top_usb_setup
coverage xml
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
with:
files: ./coverage.xml
flags: python-tests
env_vars: OS,PYTHON
fail_ci_if_error: true
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}