-
Notifications
You must be signed in to change notification settings - Fork 8
107 lines (92 loc) · 2.38 KB
/
ci.yml
File metadata and controls
107 lines (92 loc) · 2.38 KB
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
name: CI
on:
push:
branches:
- master
pull_request:
branches:
- "**"
jobs:
test-lib:
name: Test bigtools
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.rust == 'nightly' }}
strategy:
matrix:
rust: [stable, nightly]
steps:
- name: Checkout the source code
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
profile: minimal
override: true
- name: Build without default features
run: cargo build --no-default-features
- name: Build with all features
run: cargo build --all-features
- name: Check with read feature
run: cargo check --features read
- name: Build with write feature
run: cargo build --features write
- name: Execute all tests
run: cargo test --all
test-python:
name: Test pybigtools
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- '3.10'
- '3.11'
- '3.12'
- '3.13'
steps:
- uses: actions/checkout@v5
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Setup Python environment
uses: astral-sh/setup-uv@v6
with:
working-directory: "pybigtools"
python-version: ${{ matrix.python-version }}
- name: Run tests
run: |
cd pybigtools
uv run pytest
lint-rust:
name: Lint Rust
runs-on: ubuntu-latest
steps:
- name: Checkout the source code
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
components: rustfmt
- name: Check formatting of all crates in the workspace
run: cargo fmt --all -- --check
lint-python:
name: Lint Python
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: astral-sh/setup-uv@v6
with:
working-directory: "pybigtools"
- run: |
cd pybigtools
uv run ruff format --check
uv run ruff check