-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (32 loc) · 896 Bytes
/
rust.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
name: Testing with Rust
on:
push:
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Test Rust
run: cargo test --verbose --all-features
check-format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set cargo fmt output
run: echo "FMT_OUTPUT=$(cargo fmt --message-format short)" >> $GITHUB_ENV
- name: Check cargo fmt output
run: echo "${{ env.FMT_OUTPUT }}"; if [ -n "${{ env.FMT_OUTPUT }}" ]; then exit 1; fi
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- uses: giraffate/clippy-action@v1
with:
reporter: 'github-pr-check'
github_token: ${{ secrets.GITHUB_TOKEN }}