-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (36 loc) · 1012 Bytes
/
ci.yml
File metadata and controls
39 lines (36 loc) · 1012 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
name: CI
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Cache cargo registry, git, bin, and target dirs
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
~/.cargo/bin
target
tests/target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install nightly + rustfmt
run: rustup update nightly && rustup default nightly && rustup component add rustfmt clippy
- name: Install dylint
run: cargo install --locked --force cargo-dylint@5.0.0 dylint-link@5.0.0
- name: Format
run: cargo fmt --check
- name: Build
run: cargo build --verbose
- name: Test
run: cargo test --verbose
- name: Clippy
run: cargo clippy --all-targets -- -Dwarnings