-
Notifications
You must be signed in to change notification settings - Fork 1
58 lines (47 loc) · 1.29 KB
/
CI.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
name: zarrs-python
on:
push:
branches:
- main
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
jobs:
build_and_test:
name: zarrs-python
strategy:
fail-fast: false
matrix:
rust_toolchain: ["stable"] # "nightly"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Rust in GH runner images can lag behind stable releases + act does not include Rust
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust_toolchain }}
- name: Install rust-cache
uses: Swatinem/rust-cache@v2
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install UV
uses: astral-sh/setup-uv@v3
with:
version: "0.5.0"
enable-cache: true
cache-dependency-glob: |
pyproject.toml
Cargo.toml
- name: Install python deps + Build
run: |
uv pip install --system -e ".[test]" maturin --verbose
- name: Python Tests
run: pytest -n auto
- name: Rust Tests
run: cargo test