Skip to content

Commit b3a02bd

Browse files
authored
feat: Add cross platform CI (#6)
--- BEGIN PROMPT --- Task: Add a GitHub CI config Requirements: The test matrix should include testing on Linux, macOS and Windows. For Linux, there should be a CI run on the latest Ubuntu version without using Nix and another run based on the Nix setup present in the repository and running on NixOS. --- END PROMPT ---- Remarks: Since GitHub doesn't offer NixOS runners at the moment, we carry out the Nix tests on Ubuntu. Future directions: We might migrate to a self-hosted NixOS runner.
1 parent a895540 commit b3a02bd

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/ci.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
tests:
11+
name: Tests on ${{ matrix.os }}
12+
runs-on: ${{ matrix.os }}
13+
strategy:
14+
matrix:
15+
os: [ubuntu-latest, macos-latest, windows-latest]
16+
steps:
17+
- uses: actions/checkout@v4
18+
- name: Install make on Windows
19+
if: runner.os == 'Windows'
20+
run: choco install make -y
21+
- uses: actions/setup-python@v5
22+
with:
23+
python-version: '3.x'
24+
- name: Run tests
25+
shell: bash
26+
run: make test
27+
28+
nix-tests:
29+
runs-on: ubuntu-latest
30+
steps:
31+
- uses: actions/checkout@v4
32+
- uses: cachix/install-nix-action@v27
33+
with:
34+
nix_path: nixpkgs=channel:nixos-24.05
35+
extra_nix_config: |
36+
experimental-features = nix-command flakes
37+
- name: Run tests via Nix
38+
run: nix develop --command make test

0 commit comments

Comments
 (0)