-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (61 loc) · 2.02 KB
/
Copy pathrust.yml
File metadata and controls
70 lines (61 loc) · 2.02 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
name: Rust
on:
push:
branches:
- main
paths:
- 'crates/**'
- Cargo.toml
- Cargo.lock
- rust-toolchain.toml
- rustfmt.toml
- .github/workflows/rust.yml
pull_request:
paths:
- 'crates/**'
- Cargo.toml
- Cargo.lock
- rust-toolchain.toml
- rustfmt.toml
- .github/workflows/rust.yml
# The `ignored-tests` job below is network-gated; run it manually or weekly so
# the PR gate stays offline. See ADR-0004.
workflow_dispatch:
schedule:
- cron: '0 6 * * 1' # Mondays 06:00 UTC
permissions:
contents: read
concurrency:
group: rust-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
persist-credentials: false
# The toolchain (and rustfmt/clippy components) is selected by
# rust-toolchain.toml via the runner's preinstalled rustup — no
# third-party action needed.
- name: Format check
run: cargo fmt --all -- --check
- name: Clippy
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Test
run: cargo test --all-features --locked --workspace
ignored-tests:
# Network-gated: these tests download tree-sitter grammars from GitHub
# releases (see ADR-0004). Kept off the PR/push gate so it stays offline and
# flake-free; runs on manual dispatch or the weekly schedule to catch
# grammar-fetch / parser-compat regressions.
if: github.event_name == 'workflow_dispatch' || github.event_name == 'schedule'
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
persist-credentials: false
- name: Test (ignored / network-gated)
run: cargo test --all-features --locked --workspace -- --ignored