Skip to content

Commit c79ae44

Browse files
committed
Add matrix build and test CI workflow
Signed-off-by: Pierre R. Mai <pmai@pmsf.de>
1 parent 312e856 commit c79ae44

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

.github/workflows/build.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: CI Builds
2+
3+
on:
4+
push:
5+
pull_request:
6+
branches: [ main ]
7+
8+
jobs:
9+
build-python:
10+
name: Build Python
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
python-version: ["3.10", "3.11", "3.12", "3.13"]
15+
os: [ubuntu-latest, macos-latest, windows-latest]
16+
runs-on: ${{ matrix.os }}
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
with:
21+
submodules: true
22+
23+
- name: Setup Python
24+
uses: actions/setup-python@v5
25+
with:
26+
python-version: ${{ matrix.python-version }}
27+
28+
- name: Install Python Dependencies
29+
run: |
30+
python -m pip install --upgrade pip
31+
python -m pip install poetry
32+
33+
- name: Build Python
34+
run: poetry build
35+
36+
- name: Install Python
37+
run: poetry install
38+
39+
- name: Run Python Tests
40+
run: poetry run pytest -vv
41+
42+
- name: Upload Python Distribution
43+
if: ${{ github.event_name == 'pull_request' || ( github.event_name == 'push' && ( github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') ) ) }}
44+
uses: actions/upload-artifact@v4
45+
with:
46+
name: python-dist
47+
path: dist/

0 commit comments

Comments
 (0)