-
Notifications
You must be signed in to change notification settings - Fork 1
86 lines (70 loc) · 2.26 KB
/
Copy pathshallow-gates.yml
File metadata and controls
86 lines (70 loc) · 2.26 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
# Shallow release gates — fast checks for every PR and every release.
# All steps must pass. Failure at any step halts the workflow.
name: Shallow Gates
on:
pull_request:
branches: [main]
push:
branches: [main]
workflow_call: # reusable by release workflow
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
shallow-gates:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: "1.94"
components: rustfmt, clippy
- name: Format check (fmt)
id: fmt
run: cargo fmt --check
- name: Compile check (check)
id: check
run: cargo check --all-targets
- name: Lint (clippy)
id: clippy
run: cargo clippy --all-targets -- -D warnings
- name: Unit and integration tests (test)
id: test
run: cargo test
- name: Documentation (doc)
id: doc
run: cargo doc --no-deps --document-private-items
- name: Publish dry-run (publish_dry_run)
id: publish_dry_run
run: cargo publish -p rust-tokio-supervisor --dry-run
- name: Coding standard check (coding_standard)
id: coding_standard
working-directory: rust-supervisor
run: bash scripts/check-coding-standard.sh
- name: Maintainability check (maintainability)
id: maintainability
working-directory: rust-supervisor
run: bash scripts/check-maintainability.sh
- name: Generate SBOM (generate_sbom)
id: generate_sbom
working-directory: rust-supervisor
run: bash scripts/generate-sbom.sh
- name: Validate SBOM (validate_sbom)
id: validate_sbom
working-directory: rust-supervisor
run: bash scripts/validate-sbom.sh
# ---- Cross-platform compile check (core supervision only on non-Unix) ----
cross-platform-check:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: "1.94"
- name: Compile check (${{ matrix.os }})
run: cargo check