-
Notifications
You must be signed in to change notification settings - Fork 18
119 lines (102 loc) · 3.08 KB
/
status-checks.yml
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
on:
push:
branches: [main]
pull_request: {}
workflow_dispatch: {}
merge_group:
branches:
- main
- release
name: status-checks
jobs:
lint_and_format:
name: Lint and Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: 🦀 Install Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
- name: ⚡ Cache
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
${{ runner.os }}-cargo
- name: Install just
uses: baptiste0928/cargo-install@v3
with:
crate: just
- name: Run lint
run: just lint
security_audit:
name: Security Audit
runs-on: ubuntu-latest
permissions:
pull-requests: write
checks: write
steps:
- uses: actions/checkout@v4
- uses: rustsec/audit-check@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
testing:
name: Run Tests
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- name: 🦀 Install Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
- name: ⚡ Cache
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
${{ runner.os }}-cargo
- name: Install just
uses: baptiste0928/cargo-install@v3
with:
crate: just
- name: Install wasm-pack
uses: baptiste0928/cargo-install@v3
with:
crate: cargo-llvm-cov
- name: Install Java 17
uses: actions/setup-java@v4
with:
distribution: corretto
java-version: 17
- name: Install Dotnet 8
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x
cache: true
- name: Try to fix .NET issue
# https://github.com/dotnet/runtime/issues/91987
run: |
sudo rm -rf /tmp/.dotnet
- name: Tests with Coverage
run: just test-cov
- name: Coverage Report
run: |
cargo llvm-cov report --hide-instantiations --ignore-filename-regex '^(tests/.*\.rs|.*/tests\.rs)$' --codecov --output-path target/codecov.json
cargo llvm-cov report --hide-instantiations --ignore-filename-regex '^(tests/.*\.rs|.*/tests\.rs)$' --html --output-dir target/coverage
cargo llvm-cov report --hide-instantiations --ignore-filename-regex '^(tests/.*\.rs|.*/tests\.rs)$'
- name: Upload Coverage to CodeCov
uses: codecov/[email protected]
with:
use_oidc: true
fail_ci_if_error: true
files: target/codecov.json
name: codecov.json