Skip to content

Commit 7abb661

Browse files
authored
Merge pull request #3 from KristianP26/ci/github-actions
ci: add GitHub Actions workflow
2 parents 95219a0 + 6337b1f commit 7abb661

1 file changed

Lines changed: 49 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
8+
concurrency:
9+
group: ci-${{ github.ref }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
# Cross-platform import safety: every module must byte-compile and the
14+
# package must import on a non-Windows host (no GUI / Win32 deps needed).
15+
compile:
16+
name: compile (ubuntu / py3.12)
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v4
20+
- uses: actions/setup-python@v5
21+
with:
22+
python-version: "3.12"
23+
- run: python -m compileall src/ tests/
24+
- run: python -c "import src; print('OK')"
25+
26+
# Full test suite on the target platform.
27+
test:
28+
name: test (windows / py${{ matrix.python-version }})
29+
runs-on: windows-latest
30+
strategy:
31+
fail-fast: false
32+
matrix:
33+
python-version: ["3.11", "3.12"]
34+
steps:
35+
- uses: actions/checkout@v4
36+
- uses: actions/setup-python@v5
37+
with:
38+
python-version: ${{ matrix.python-version }}
39+
cache: pip
40+
- name: Install dependencies
41+
run: |
42+
python -m pip install --upgrade pip
43+
pip install -r requirements.txt
44+
- name: Byte-compile
45+
run: python -m compileall src/ tests/
46+
- name: Run tests
47+
env:
48+
QT_QPA_PLATFORM: offscreen
49+
run: python -m unittest discover -s tests -v

0 commit comments

Comments
 (0)