forked from napari/napari
-
Notifications
You must be signed in to change notification settings - Fork 0
172 lines (151 loc) · 5.14 KB
/
test_comprehensive.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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
# The full test suite, which will be run anytime anything is merged into main.
# See test_pull_request.yml for the tests that will be run
name: Full Test
on:
push:
branches:
- main
tags:
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
concurrency:
group: comprehensive-test
jobs:
manifest:
name: Check Manifest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install dependencies
run: |
pip install --upgrade pip
pip install check-manifest
- name: Check Manifest
run: check-manifest
test:
name: ${{ matrix.platform }} py${{ matrix.python }} ${{ matrix.toxenv }} ${{ matrix.MIN_REQ && 'min_req' }}
runs-on: ${{ matrix.platform }}
strategy:
fail-fast: false
matrix:
platform: [ubuntu-latest, windows-latest]
python: ["3.8", "3.9", "3.10"]
backend: [pyqt5, pyside2]
include:
- python: 3.9
platform: macos-latest
backend: pyqt5
# test with minimum specified requirements
- python: 3.8
platform: ubuntu-18.04
backend: pyqt5
MIN_REQ: 1
# test with --async_only
- python: 3.8
platform: ubuntu-18.04
toxenv: async-py38-linux-pyqt5
# test without any Qt backends
- python: 3.8
platform: ubuntu-18.04
toxenv: headless-py38-linux
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
cache: "pip"
- uses: tlambert03/setup-qt-libs@v1
# strategy borrowed from vispy for installing opengl libs on windows
- name: Install Windows OpenGL
if: runner.os == 'Windows'
run: |
git clone --depth 1 https://github.com/pyvista/gl-ci-helpers.git
powershell gl-ci-helpers/appveyor/install_opengl.ps1
if (Test-Path -Path "C:\Windows\system32\opengl32.dll" -PathType Leaf) {Exit 0} else {Exit 1}
- name: Install dependencies
run: |
pip install --upgrade pip
pip install setuptools tox tox-gh-actions
python tools/minreq.py # no-op if MIN_REQ is not set
env:
MIN_REQ: ${{ matrix.MIN_REQ }}
# here we pass off control of environment creation and running of tests to tox
# tox-gh-actions, installed above, helps to convert environment variables into
# tox "factors" ... limiting the scope of what gets tested on each platform
# The one exception is if the "toxenv" environment variable has been set,
# in which case we are declaring one specific tox environment to run.
# see tox.ini for more
- name: Test with tox
uses: GabrielBB/xvfb-action@v1
with:
run: python -m tox
env:
PLATFORM: ${{ matrix.platform }}
BACKEND: ${{ matrix.backend }}
TOXENV: ${{ matrix.toxenv }}
NUMPY_EXPERIMENTAL_ARRAY_FUNCTION: ${{ matrix.MIN_REQ || 1 }}
PYVISTA_OFF_SCREEN: True
MIN_REQ: ${{ matrix.MIN_REQ }}
- name: Coverage
uses: codecov/codecov-action@v3
- name: Report Failures
if: ${{ failure() }}
uses: JasonEtco/create-an-issue@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PLATFORM: ${{ matrix.platform }}
PYTHON: ${{ matrix.python }}
BACKEND: ${{ matrix.toxenv }}
RUN_ID: ${{ github.run_id }}
TITLE: "[test-bot] Comprehensive tests failing"
with:
filename: .github/TEST_FAIL_TEMPLATE.md
update_existing: true
test_pip_install:
name: ubuntu-latest 3.9 pip install
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
path: napari-from-github
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.9
cache: "pip"
- uses: tlambert03/setup-qt-libs@v1
- name: Install this commit
run: |
pip install --upgrade pip
pip install ./napari-from-github[all,testing]
- name: Test
uses: GabrielBB/xvfb-action@v1
with:
run: python -m pytest --pyargs napari --color=yes
test_examples:
name: test examples
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.9
- uses: tlambert03/setup-qt-libs@v1
- name: Install this commit
run: |
pip install --upgrade pip
pip install setuptools tox tox-gh-actions
- name: Test
uses: GabrielBB/xvfb-action@v1
with:
run: tox -e py39-linux-pyside2-examples