Skip to content

Commit 6fe2c5c

Browse files
authored
Merge pull request #9 from InsightSoftwareConsortium/ci
ENH: Add GitHub Actions configuration
2 parents 9c75659 + fcab69b commit 6fe2c5c

File tree

3 files changed

+57
-1
lines changed

3 files changed

+57
-1
lines changed
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: tests
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- main
8+
pull_request:
9+
branches:
10+
- master
11+
- main
12+
workflow_dispatch:
13+
14+
jobs:
15+
test:
16+
name: ${{ matrix.platform }} py${{ matrix.python-version }}
17+
runs-on: ${{ matrix.platform }}
18+
strategy:
19+
matrix:
20+
platform: [ubuntu-latest, windows-latest, macos-latest]
21+
python-version: [3.7, 3.8, 3.9]
22+
23+
steps:
24+
- uses: actions/checkout@v2
25+
26+
- name: Set up Python ${{ matrix.python-version }}
27+
uses: actions/setup-python@v2
28+
with:
29+
python-version: ${{ matrix.python-version }}
30+
31+
- name: Install dependencies
32+
run: |
33+
python -m pip install --upgrade pip
34+
pip install flit
35+
flit install --deps develop
36+
37+
# these libraries, along with pytest-xvfb (added in the `deps` in tox.ini),
38+
# enable testing on Qt on linux
39+
- name: Install Linux libraries
40+
if: runner.os == 'Linux'
41+
run: |
42+
sudo apt-get install -y libdbus-1-3 libxkbcommon-x11-0 libxcb-icccm4 \
43+
libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 \
44+
libxcb-xinerama0 libxcb-xinput0 libxcb-xfixes0
45+
pip install pytest-xvfb
46+
47+
# strategy borrowed from vispy for installing opengl libs on windows
48+
- name: Install Windows OpenGL
49+
if: runner.os == 'Windows'
50+
run: |
51+
git clone --depth 1 git://github.com/pyvista/gl-ci-helpers.git
52+
powershell gl-ci-helpers/appveyor/install_opengl.ps1
53+
54+
- name: Test
55+
run: |
56+
pytest tests.py

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ git clone https://github.com/InsightSoftwareConsortium/itk-napari-conversion.git
4242
cd itk-napari-conversation
4343
pip install flit pytest
4444
flit install --symlink
45-
pytest test.py
45+
pytest tests.py
4646
```
4747

4848
Follow the [itk contributing
File renamed without changes.

0 commit comments

Comments
 (0)