-
Notifications
You must be signed in to change notification settings - Fork 14
56 lines (46 loc) · 1.3 KB
/
static-analysis.yaml
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
name: Static Analysis
on:
pull_request:
types: [opened, reopened, synchronize, ready_for_review]
workflow_dispatch:
jobs:
fmt:
runs-on: ubuntu-latest
steps:
- name: Checkout the source code
uses: actions/checkout@v3
- name: Install & display rust toolchain
run: rustup show
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
version: '3.x'
- name: Check targets are installed correctly
run: rustup target list --installed
- name: Check fmt
run: cargo fmt -- --check
- name: Check Cargo.toml format
run: |
if taplo --version &> /dev/null; then
echo "taplo-cli is already installed"
else
cargo install taplo-cli
fi
taplo fmt --check
clippy:
runs-on: ubuntu-latest
steps:
- name: Checkout the source code
uses: actions/checkout@v3
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
version: '3.x'
- name: Install & display rust toolchain
run: rustup show
- name: Check targets are installed correctly
run: rustup target list --installed
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: -- -D warnings