-
Notifications
You must be signed in to change notification settings - Fork 1
42 lines (32 loc) · 856 Bytes
/
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
name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
build:
name: Build project
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Cargo cache
uses: Swatinem/rust-cache@v2
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- name: Cargo build
run: cargo build --release
- name: Cargo test
run: cargo test --release
- name: Cargo clippy
run: |
cargo clippy --release --all-targets --all-features -- -D warnings
cargo clippy --release --all-targets --no-default-features -- -D warnings
- name: Cargo fmt
run: cargo fmt -- --check