-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (41 loc) · 1.08 KB
/
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
43
44
45
46
47
48
49
50
51
name: CI
on: [pull_request]
env:
RUST_VERSION: 1.77.2
jobs:
test:
strategy:
matrix:
os: [ ubuntu-latest, macos-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Cache Cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ matrix.build }}-cargo-${{ hashFiles('Cargo.lock') }}
restore-keys: |
${{ matrix.build }}-cargo-
- name: Install Rust
run: |
rustup update $RUST_VERSION --no-self-update
rustup default $RUST_VERSION
rustup component add rustfmt
rustup component add clippy
- name: Check Format
run: cargo fmt --all -- --check
- name: Clippy
run: cargo clippy --tests --benches -- -D clippy::all
- name: Test
run: cargo test --all-features -- --test-threads=1
env:
RUST_BACKTRACE: 1
all-checks:
runs-on: ubuntu-latest
needs: [test]
steps:
- run: echo "checks ok"