forked from GSI-HPC/unjam
-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (50 loc) · 1.33 KB
/
Copy pathchecks.yml
File metadata and controls
57 lines (50 loc) · 1.33 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
# SPDX-License-Identifier: LGPL-3.0-or-later
# SPDX-FileCopyrightText: © GSI Helmholtzzentrum f. Schwerionenforschung GmbH, Darmstadt, Germany
name: Checks
on:
workflow_call:
env:
CARGO_TERM_COLOR: always
jobs:
fmt:
name: Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- run: rustup component add rustfmt
- run: cargo fmt --check
clippy:
name: Clippy
runs-on: ubuntu-latest
permissions:
security-events: write
steps:
- uses: actions/checkout@v6
- run: rustup component add clippy
- uses: Swatinem/rust-cache@v2
- name: Install SARIF tools
run: cargo install clippy-sarif sarif-fmt
- name: Run clippy
run: >
cargo clippy --all-targets --all-features --message-format=json -- -D warnings
| clippy-sarif
| tee clippy-results.sarif
| sarif-fmt
- name: Upload analysis results to GitHub
uses: github/codeql-action/upload-sarif@v4
with:
sarif_file: clippy-results.sarif
wait-for-processing: true
if: always()
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- run: cargo build
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- run: cargo test