-
Notifications
You must be signed in to change notification settings - Fork 3
102 lines (88 loc) · 2.71 KB
/
ci.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
name: Test and build
on: [push, pull_request, release]
jobs:
qa:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pre-commit/[email protected]
check-links:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: gaurav-nelson/github-action-markdown-link-check@v1
name: Check links in markdown files
with:
use-quiet-mode: 'yes'
use-verbose-mode: 'yes'
test:
needs: qa
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -l {0}
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
exclude:
- os: macos-latest
python-version: "3.11"
steps:
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
activate-environment: guikit
- name: Check conda
run: conda info
- name: Install Linux dependencies
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt update
sudo apt -y install libsdl2-mixer-2.0-0 libsdl2-image-2.0-0 libsdl2-2.0-0 libgtk2.0-0
- name: Install MacOS dependencies
if: matrix.os == 'macos-latest'
run: conda install python.app
- name: Install dependencies
run: |
conda install pip
conda install wxPython -c conda-forge
python -m pip install --upgrade pip setuptools wheel
python -m pip install -e .[dev]
- name: Test with pytest (Windows)
if: matrix.os == 'windows-latest'
run: |
python -m pytest
- name: Test with pytest (Linux)
if: matrix.os == 'ubuntu-latest'
run: |
xvfb-run -a python -m pytest
- name: Test with pytest (MacOS)
if: matrix.os == 'macos-latest'
run: |
pythonw -m pytest
docs:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build docs
uses: ammaraskar/sphinx-action@master
with:
pre-build-command: |
python -m pip install --upgrade pip setuptools wheel
pip install -U sphinx myst-parser sphinx-autoapi sphinx-rtd-theme
build-command: sphinx-build -n -b html . ../build/html
- uses: actions/upload-artifact@v3
with:
name: DocumentationHTML
path: build/html/
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: startsWith(github.ref, 'refs/tags')
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build/html