-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (51 loc) · 1.77 KB
/
Copy pathci.yml
File metadata and controls
58 lines (51 loc) · 1.77 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
# gitxtend CI — gates every PR to main.
#
# HOOK PARITY: this pipeline is mirrored by .githooks/pre-push. When editing the
# steps here, update the hook to match (and vice-versa).
name: ci
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
CARGO_TERM_COLOR: always
jobs:
check:
name: fmt + clippy + test (core) + build (python)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
- name: rustfmt
run: cargo fmt --all --check
# The pure-Rust core (no PyO3 / no libpython): the M1 read methods live here.
- name: clippy (core)
run: cargo clippy --no-default-features --all-targets -- -D warnings
- name: test (core)
run: cargo test --no-default-features
# The PyO3 wheel surface. `extension-module` links no libpython, so it
# builds on CI without python-dev.
- name: clippy (python)
run: cargo clippy --features extension-module -- -D warnings
- name: build (python)
run: cargo build --features extension-module
python-e2e:
name: maturin build + Python E2E vs git
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: build wheel + run the E2E suite (the compiled module vs the real git CLI)
run: |
python -m venv .venv
.venv/bin/pip install -q maturin
.venv/bin/maturin develop --release --extras dev
.venv/bin/python -m pytest python/tests/ --cov=gitxtend --cov-fail-under=80