-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (78 loc) · 2.01 KB
/
check.yml
File metadata and controls
82 lines (78 loc) · 2.01 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
name: Checks
on:
push:
branches: [ "**" ]
tags-ignore: [ "**" ]
pull_request:
concurrency:
cancel-in-progress: true
group: checks-${{ github.event.pull_request.number || github.ref }}
jobs:
fmt:
runs-on: ubuntu-latest
name: ${{ matrix.toolchain }} / fmt
permissions:
contents: read
strategy:
fail-fast: false
matrix:
toolchain: [ "stable", "nightly" ]
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Setup toolchain
uses: dtolnay/rust-toolchain@master
with:
components: rustfmt
toolchain: ${{ matrix.toolchain }}
- name: Cargo fmt
run: cargo fmt --check
clippy:
runs-on: ubuntu-latest
name: ${{ matrix.toolchain }} / clippy
permissions:
contents: read
checks: write
strategy:
fail-fast: false
matrix:
toolchain: [ "stable", "nightly" ]
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Setup toolchain
uses: dtolnay/rust-toolchain@master
with:
components: clippy
toolchain: ${{ matrix.toolchain }}
- name: Setup Protoc
uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Cargo clippy
uses: clechasseur/rs-clippy-check@v5
test:
runs-on: ubuntu-latest
name: ${{ matrix.toolchain }} / test
permissions:
contents: read
strategy:
fail-fast: false
matrix:
toolchain: [ "stable", "nightly" ]
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Setup toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
- name: Setup Protoc
uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Cargo test
uses: clechasseur/rs-cargo@v4
with:
command: test
args: --locked