-
Notifications
You must be signed in to change notification settings - Fork 0
91 lines (74 loc) · 2.22 KB
/
tests.yml
File metadata and controls
91 lines (74 loc) · 2.22 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
name: Tests
on: [push, pull_request]
jobs:
pre-commit:
name: Pre-Commit Checks
runs-on: ubuntu-latest
steps:
- name: Checkout to master
uses: actions/checkout@master
- name: Setup python
uses: actions/setup-python@v1
with:
python-version: '3.8'
architecture: 'x64'
- name: Pre-Commit Checks
run: |
python -m pip install pip --upgrade
pip install nox
nox -s pre_commit
- name: Analysis (git diff)
if: failure()
run: git diff
unit-tests:
name: UnitTests-Python-${{ matrix.python-version }}
needs: [ pre-commit ]
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ '3.7', '3.8', '3.9', '3.10' ]
steps:
- name: Checkout to master
uses: actions/checkout@master
- name: Setup Python-${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Setup test environment
run: |
python -m pip install pip --upgrade
pip install nox
sudo Xvfb :1 -screen 0 1024x768x24 </dev/null &
- name: Unit Tests
run: |
export DISPLAY=":1"
nox -s tests
nox -s coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1.0.6
with:
file: coverage.xml
flags: unittests
name: codecov-xrectsel-${{ matrix.python-version }}
package-check:
name: Devel Setup - Build & Verify Package
needs: [ pre-commit ]
runs-on: ubuntu-latest
steps:
- name: Checkout to master
uses: actions/checkout@master
- name: Setup python
uses: actions/setup-python@v1
with:
python-version: '3.8'
architecture: 'x64'
- name: Setup test environment
run: |
python -m pip install pip --upgrade
pip install nox
sudo Xvfb :1 -screen 0 1024x768x24 </dev/null &
- name: Devel setup checks
run: export DISPLAY=":1" && nox -s dev_setup
- name: Build and Verify Package
run: export DISPLAY=":1" && nox -s package