-
Notifications
You must be signed in to change notification settings - Fork 2
56 lines (45 loc) · 1.24 KB
/
ci.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
name: CI
on:
push:
branches:
- main
pull_request:
types: [ opened, synchronize, reopened, ready_for_review ]
branches:
- main
workflow_dispatch:
env:
RUST_TOOLCHAIN: 1.81.0
jobs:
typos:
name: Typos Check
runs-on: ubuntu-20.04
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Check typos
uses: crate-ci/typos@master
cargo-check:
if: github.event.pull_request.draft == false
runs-on: ubuntu-20.04
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Protobuf
uses: arduino/setup-protoc@v2
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
override: true
components: rustfmt, clippy
- name: Check format
run: cargo fmt
- name: Check clippy
run: cargo clippy --workspace --all-targets -- -D warnings -D clippy::print_stdout -D clippy::print_stderr
- name: Install latest nextest release
uses: taiki-e/install-action@nextest
- name: Check test
run: cargo nextest run