-
Notifications
You must be signed in to change notification settings - Fork 2
77 lines (73 loc) · 2.39 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: Test
on:
pull_request:
push:
jobs:
Rust:
if: "! contains(github.event.head_commit.message, '[skip ci]')"
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.allow-fail }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-12]
allow-fail: [false]
steps:
- uses: actions/checkout@v3.5.2
- uses: cachix/install-nix-action@v25
with:
nix_path: nixpkgs=channel:nixos-23.05
- uses: Swatinem/rust-cache@v2.4.0
- name: Test in nix-shell
run: nix-shell rust/shell.nix --run "cd rust && cargo test --color=always"
- name: Test in nix develop
run: cd rust && nix --extra-experimental-features nix-command --extra-experimental-features flakes develop -c cargo test --color=always
Python:
if: "! contains(github.event.head_commit.message, '[skip ci]')"
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.allow-fail }}
env:
EXPECTED_PY: ${{ matrix.py }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-12]
py: [python39, python310, python311]
allow-fail: [false]
include:
- os: ubuntu-latest
py: python312
allow-fail: true
- os: macos-12
py: python312
allow-fail: true
steps:
- uses: actions/checkout@v3.5.2
- uses: cachix/install-nix-action@v25
with:
nix_path: nixpkgs=channel:nixos-23.05
- name: Test in nix develop
run: cd python && nix --extra-experimental-features nix-command --extra-experimental-features flakes develop .#${{ matrix.py }} -c pytest --color=yes -v
Python-flake-compat:
if: "! contains(github.event.head_commit.message, '[skip ci]')"
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.allow-fail }}
env:
EXPECTED_PY: ${{ matrix.py }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-12]
py: [python311]
allow-fail: [false]
steps:
- uses: actions/checkout@v3.5.2
- uses: cachix/install-nix-action@v25
with:
nix_path: nixpkgs=channel:nixos-23.05
- name: Test in nix-shell
run: nix-shell python/shell.nix --argstr py ${{ matrix.py }} --run 'cd python && pytest --color=yes -v'
# TODO Rust bindgen
# TODO Rust PyO3
# TODO home manager
# TODO C++ with clang support