-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (43 loc) · 1.17 KB
/
check_and_test.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
name: Check and test
on:
push:
branches:
- master
pull_request:
branches:
- master
env:
CARGO_TERM_COLOR: always
jobs:
test:
name: Check and test
strategy:
matrix:
platform: [ubuntu-latest]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup protoc
uses: arduino/[email protected]
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup rust toolchain
run: |
rustup install nightly
rustup component add rustfmt --toolchain nightly
rustup show
- name: Install nextest
uses: taiki-e/install-action@nextest
- uses: Swatinem/rust-cache@v2
with:
shared-key: check-and-test-${{ matrix.platform }}-v1
- name: Check code format
run: cargo +nightly fmt -- --check
- name: Check the package for errors
run: cargo check --all
- name: Lint rust sources
run: cargo clippy --all-targets --all-features --tests --benches -- -D warnings
- name: Execute rust tests
run: cargo nextest run --all-features