-
Notifications
You must be signed in to change notification settings - Fork 2
43 lines (35 loc) · 1.16 KB
/
unit-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
41
42
43
name: Run Unit Tests
on: [push, pull_request]
jobs:
unit-test:
name: Python ${{ matrix.python-version }} ${{ matrix.os }} test
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
# 3.6 is the version readily available on EL7. Requires ubuntu-20.04.
# 3.9 would seem to be the highest python version readily available
# on EL8.
# Also test against the very latest 3 series available.
python-version: [3.6, 3.9, 3.x]
os: [ubuntu-20.04, ubuntu-latest]
exclude:
- os: ubuntu-latest
python-version: 3.6
- os: ubuntu-20.04
python-version: 3.9
- os: ubuntu-20.04
python-version: 3.x
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Set up dependencies
run: pip install -r requirements-test.txt
- name: Run unit tests
run: coverage run --branch --source=check -m unittest discover --buffer
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3.1.4