Skip to content

Commit 77bc028

Browse files
committed
Add CI/CD workflows
1 parent 873673f commit 77bc028

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Build/Test
2+
3+
jobs:
4+
build:
5+
name: Build the library and run tests
6+
strategy:
7+
matrix:
8+
os: [ubuntu-latest, ubuntu-24.04, ubuntu-22.04,
9+
ubuntu-24.04-arm, macos-latest, macos-14]
10+
runs-on: ${{ matrix.os }}
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v4
14+
15+
- name: Build and install library
16+
run: |
17+
sudo python3 setup.py install
18+
19+
- name: Install pytest
20+
run: |
21+
if [[ "${{ matrix.os }}" =~ "ubuntu" ]]; then
22+
sudo apt update
23+
sudo apt install -y python3-pytest
24+
else
25+
sudo python3 -m ensurepip --upgrade
26+
sudo pip3 install pytest
27+
fi
28+
29+
- name: Run tests
30+
run: |
31+
pytest .

.github/workflows/pr.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
name: PR
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
build:
8+
uses: ./.github/workflows/build-and-test.yml

0 commit comments

Comments
 (0)