Skip to content

Commit 52b3458

Browse files
author
Jan Luca van den Busch
committed
added CI build test
1 parent a2bc458 commit 52b3458

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Python Extension CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
build-and-test:
13+
runs-on: ubuntu-latest
14+
15+
strategy:
16+
matrix:
17+
os: [ubuntu-latest, macos-latest, windows-latest]
18+
19+
steps:
20+
- name: Checkout code
21+
uses: actions/checkout@v2
22+
23+
- name: Set up Python
24+
uses: actions/setup-python@v2
25+
with:
26+
python-version: 3.8
27+
28+
- name: Install build dependencies
29+
run: |
30+
if [ "${{ matrix.os }}" == "windows-latest" ]; then
31+
choco install visualstudio2019buildtools --package-parameters "--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64"
32+
fi
33+
34+
- name: Build Python extension
35+
run: |
36+
python setup.py build_ext --inplace
37+
38+
- name: Install test dependencies
39+
run: |
40+
python -m pip install -r requirements.txt
41+
42+
- name: Run tests with pytest
43+
run: |
44+
pytest

0 commit comments

Comments
 (0)