-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (41 loc) · 986 Bytes
/
ci.yaml
File metadata and controls
45 lines (41 loc) · 986 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
35
36
37
38
39
40
41
42
43
44
45
---
name: CI
on:
workflow_call:
workflow_dispatch:
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Cache
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Build binaries
run: cargo build
- name: Run tests
run: cargo test
fmt:
name: Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install nightly toolchain for rustfmt
uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt
- name: Check code format
run: cargo +nightly fmt --all -- --check
clippy:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Lint code
run: cargo clippy --all-features -- -D warnings