-
Notifications
You must be signed in to change notification settings - Fork 13
42 lines (36 loc) · 1.04 KB
/
unit-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 tests"
on:
push:
paths-ignore:
- 'tests/**'
pull_request:
paths-ignore:
- 'tests/**'
jobs:
unit-tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [2.7]
steps:
- uses: actions/checkout@v4
- name: Set up Python
# setup-python stopped supporting Python 2.7, use https://github.com/MatteoH2O1999/setup-python
uses: MatteoH2O1999/[email protected]
with:
python-version: ${{ matrix.python-version }}
allow-build: info
cache-build: true
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python -m pip install coveragepy==1.6.0
- name: Run unit tests
run: |
cd unit-tests
coverage run --omit=test_*.py,unit_tests.py --source=$(cd .. ; pwd),$(cd ../util ; pwd) -m unittest unit_tests
- name: Report code coverage
run: |
cd unit-tests
coverage report