Skip to content

Commit 0c3060b

Browse files
committed
Add CI workflow for tests and package build
Run tests across 3 OSes x 3 Python versions on push to main and on pull requests. Includes package build verification.
1 parent 06d3ec6 commit 0c3060b

File tree

1 file changed

+75
-0
lines changed

1 file changed

+75
-0
lines changed

.github/workflows/ci.yml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
test:
14+
runs-on: ${{ matrix.os }}
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
os: [ubuntu-latest, windows-latest, macos-latest]
19+
python-version: ['3.9', '3.11', '3.12']
20+
21+
steps:
22+
- uses: actions/checkout@v4
23+
with:
24+
submodules: recursive
25+
26+
- name: Set up Python ${{ matrix.python-version }}
27+
uses: actions/setup-python@v5
28+
with:
29+
python-version: ${{ matrix.python-version }}
30+
31+
- name: Set up .NET
32+
uses: actions/setup-dotnet@v4
33+
with:
34+
dotnet-version: '8.0.x'
35+
36+
- name: Install dependencies
37+
run: |
38+
python -m pip install --upgrade pip
39+
pip install hatch
40+
41+
- name: Build engine binaries
42+
run: python build_differ.py
43+
44+
- name: Run tests
45+
run: hatch run test
46+
47+
build:
48+
runs-on: ubuntu-latest
49+
steps:
50+
- uses: actions/checkout@v4
51+
with:
52+
submodules: recursive
53+
54+
- name: Set up Python
55+
uses: actions/setup-python@v5
56+
with:
57+
python-version: '3.11'
58+
59+
- name: Set up .NET
60+
uses: actions/setup-dotnet@v4
61+
with:
62+
dotnet-version: '8.0.x'
63+
64+
- name: Install build dependencies
65+
run: |
66+
python -m pip install --upgrade pip
67+
pip install hatch hatchling
68+
69+
- name: Build package
70+
run: hatch build
71+
72+
- name: Check package
73+
run: |
74+
pip install twine
75+
twine check dist/*

0 commit comments

Comments
 (0)