-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (25 loc) · 913 Bytes
/
Copy pathci.yml
File metadata and controls
34 lines (25 loc) · 913 Bytes
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
name: Rust CI
on:
push:
branches:
- main
pull_request:
permissions:
contents: read
jobs:
rust:
name: Build, test, and format
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Rust toolchain
run: rustup toolchain install stable --profile minimal --component rustfmt --component clippy
- name: Check formatting
run: cargo fmt --all -- --check
- name: Run Clippy
run: cargo clippy --workspace --all-targets --all-features -- -D warnings -W clippy::too_many_lines -W clippy::too_many_arguments -W clippy::type_complexity -W clippy::excessive_nesting -W clippy::cognitive_complexity -W clippy::pedantic -W clippy::nursery -W clippy::cargo
- name: Build
run: cargo build --locked --all-targets
- name: Test
run: cargo test --locked --all-targets