Repository navigation
57 lines (47 loc) · 1.52 KB
/
Copy pathunit_tests_pr.yml
File metadata and controls
57 lines (47 loc) · 1.52 KB
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
46
47
48
49
50
51
52
53
54
55
56
57
name: Unit tests
on:
pull_request:
paths:
- '.github/workflows/**'
- 'src/**'
- 'utest/**'
- '!**/*.rst'
jobs:
test_using_builtin_python:
strategy:
fail-fast: true
matrix:
os: [ 'ubuntu-latest', 'windows-latest' ]
python-version: [ '2.7', '3.5', '3.9' ]
exclude:
- os: windows-latest
python-version: 'pypy2'
- os: windows-latest
python-version: 'pypy3'
runs-on: ${{ matrix.os }}
name: Python ${{ matrix.python-version }} on ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Setup python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
architecture: 'x64'
- name: Disable NTP on macOS (https://github.com/actions/virtual-environments/issues/820)
run: |
sudo systemsetup -setusingnetworktime off
sudo rm -rf /etc/ntp.conf
if: runner.os == 'macOS'
- name: Run unit tests with coverage
run: |
python -m pip install coverage
python -m pip install -r utest/requirements.txt
python -m coverage run --branch utest/run.py -v
- name: Prepare HTML/XML coverage report
run: |
python -m coverage xml -i
if: always()
- uses: codecov/codecov-action@9b0b9bbe2c64e9ed41413180dd7398450dfeee14
with:
name: ${{ matrix.python-version }}-${{ matrix.os }}
if: always()