-
Notifications
You must be signed in to change notification settings - Fork 0
95 lines (75 loc) · 2.26 KB
/
Copy pathci.yml
File metadata and controls
95 lines (75 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
87
88
89
90
91
92
93
94
95
name: CI
on:
push:
branches: [main]
paths-ignore:
- ".github/workflows/nightly.yml"
- ".github/workflows/release.yml"
- "**/*.md"
- ".cursor/**"
- ".windsurf/**"
- ".gitignore"
- "LICENSE"
- ".github/renovate.json5"
pull_request:
branches: [main]
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
fetch-depth: 0
submodules: true
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Cache dependencies
uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
- name: Run tests
run: cargo test
build:
name: Build
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
fetch-depth: 0
submodules: true
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Install WASM target
run: rustup target add wasm32-wasip1
- name: Cache dependencies
uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
- name: Run clippy
run: cargo clippy -- -D warnings
- name: Check formatting
run: cargo fmt -- --check
- name: Build plugin
run: cargo build --release --target wasm32-wasip1
sbom:
name: SBOM
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
fetch-depth: 0
submodules: true
- name: Install cargo-cyclonedx
run: cargo install cargo-cyclonedx --locked
- name: Generate CycloneDX SBOM
run: cargo cyclonedx -f json --all-features --override-filename temp
- name: Clean SBOM
run: jq '
del(.metadata.component."bom-ref")
| del(.metadata.component.purl)
| del(.metadata.component.components[0]."bom-ref")
| del(.metadata.component.components[0].purl)
' temp.json > sbom.cdx.json