Repository navigation
73 lines (66 loc) · 2.25 KB
/
Copy pathrust-tests.yml
File metadata and controls
73 lines (66 loc) · 2.25 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
name: Rust Unit Tests
permissions:
contents: read
on:
push:
branches: [master]
paths:
- ".github/workflows/rust-tests.yml"
- "apps/maple-research/frontend/src-tauri/**"
- "proxy/Cargo.toml"
- "sdk/rust/Cargo.toml"
- "sdk/rust/build.rs"
- "sdk/rust/src/**"
- "sdk/rust/assets/**"
- "proxy/src/**"
- "scripts/ci/_common.sh"
- "scripts/ci/rust.sh"
- "scripts/ci/verify-local-rust-deps.sh"
- "scripts/ci/verify-agent-rust-deps.py"
- "scripts/ci/test_agent_rust_deps.py"
- "flake.nix"
- "flake.lock"
pull_request:
# Run unprivileged validation for stacked PRs as well as master targets.
paths:
- ".github/workflows/rust-tests.yml"
- "apps/maple-research/frontend/src-tauri/**"
- "proxy/Cargo.toml"
- "sdk/rust/Cargo.toml"
- "sdk/rust/build.rs"
- "sdk/rust/src/**"
- "sdk/rust/assets/**"
- "proxy/src/**"
- "scripts/ci/_common.sh"
- "scripts/ci/rust.sh"
- "scripts/ci/verify-local-rust-deps.sh"
- "scripts/ci/verify-agent-rust-deps.py"
- "scripts/ci/test_agent_rust_deps.py"
- "flake.nix"
- "flake.lock"
jobs:
rust-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # was v4
with:
persist-credentials: false
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@ef8a148080ab6020fd15196c2084a2eea5ff2d25 # was v22
with:
github-token: ""
- name: Cache sccache
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # was v4
with:
path: ~/.cache/sccache
key: ${{ runner.os }}-sccache-rust-tests-${{ hashFiles('apps/maple-research/frontend/src-tauri/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-sccache-rust-tests-
${{ runner.os }}-sccache-
- name: Run Rust unit tests
run: |
nix develop --no-update-lock-file .#ci -c ./scripts/ci/verify-local-rust-deps.sh
nix develop --no-update-lock-file .#ci -c ./scripts/ci/rust.sh
- name: Show sccache stats
if: always()
run: nix develop --no-update-lock-file .#ci -c ./scripts/ci/sccache-stats.sh