forked from napari/napari
-
Notifications
You must be signed in to change notification settings - Fork 0
101 lines (96 loc) · 2.71 KB
/
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
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
92
93
94
95
96
97
98
99
100
101
name: CI
# on:
# pull_request:
# push:
# branches:
# - master
on: [push, pull_request]
jobs:
pretest:
name: Pre-test checks
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
task: [flake8, black]
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
pip install --upgrade pip
pip install --upgrade setuptools tox
- name: Run pre-test check
run: |
tox -e ${{ matrix.task }}
linux:
# Only run this and subsequent steps on branches.
# `github.head_ref` only exists on pull requests.
# if: github.head_ref
name: Linux ${{ matrix.python-version }}
needs: pretest
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [3.6, 3.7, 3.8]
env:
DISPLAY: ':99.0'
PYVER: ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
sudo apt install libxkbcommon-x11-0
/sbin/start-stop-daemon --start --quiet \
--pidfile /tmp/custom_xvfb_99.pid --make-pidfile \
--background --exec /usr/bin/Xvfb \
-- :99 -screen 0 1920x1200x24 -ac +extension GLX
pip install --upgrade pip
pip install --upgrade setuptools tox
- name: Test
run: tox -e py${PYVER//.}-pyqt,py${PYVER//.}-pyside -- --cov-report=xml --cov=napari
- name: Coverage
if: matrix.python-version == '3.8'
uses: codecov/codecov-action@v1
windows:
name: Windows 3.8
runs-on: windows-latest
needs: pretest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
pip install --upgrade pip
pip install --upgrade setuptools tox
- name: Test
run: tox -e py38-pyside -- -o qt_no_exception_capture=1
mac:
name: Mac 3.8
runs-on: macos-latest
needs: pretest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
pip install --upgrade pip
pip install --upgrade setuptools tox
- name: Test
run: tox -e py38-pyqt,py38-pyside