-
Notifications
You must be signed in to change notification settings - Fork 2
79 lines (65 loc) · 2.1 KB
/
validate.yaml
File metadata and controls
79 lines (65 loc) · 2.1 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
name: Validate
on:
push:
branches:
- main
pull_request:
concurrency:
group: validate-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
RUST_BACKTRACE: 1
jobs:
rust:
name: Rust
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2
# Setup Rust toolchain
- run: |
rustup toolchain install nightly --component rustfmt
rustup component add llvm-tools-preview
# Cache dependencies and build artifacts
- uses: swatinem/rust-cache@f0deed1e0edfc6a9be95417288c0e1099b1eeec3 # v2
with:
save-if: ${{ github.ref == 'refs/heads/main' }}
cache-provider: "github"
# Add custom matcher for cargo output
- run: echo "::add-matcher::.github/matcher/cargo.json"
- name: Check formatting
run: cargo +nightly fmt --check
- name: Lint
run: cargo clippy -- -D warnings
# Run tests with coverage instrumentation
- name: Test
run: cargo test
env:
RUSTFLAGS: -C instrument-coverage
LLVM_PROFILE_FILE: test-%p-%m.profraw
# Convert and upload coverage report
- run: cargo install --locked grcov
- run: grcov . -s . --binary-path ./target/debug/ --branch --ignore-not-existing -t lcov -o ./lcov.info
- name: Upload coverage report
uses: codecov/codecov-action@ad3126e916f78f00edff4ed0317cf185271ccc2d # v5.4.2
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
fail_ci_if_error: true
cargo-deny:
uses: ./.github/actions/cargo-deny-action
check-drivers:
runs-on: ubuntu-latest
name: Check included python drivers
strategy:
matrix:
projects: ["drivers/hypha-accelerate-driver", "drivers/aim-driver"]
steps:
- uses: actions/checkout@v5
- id: validate-python-project-uv-action
uses: ./.github/actions/validate-python-project-uv-action@jg/release-setup
with:
project-path: ${{ matrix.projects }}