-
Notifications
You must be signed in to change notification settings - Fork 9
73 lines (58 loc) · 1.51 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: CI
on: push
jobs:
tests:
name: Tests (Rust ${{ matrix.rustup-toolchain }}, Ruby ${{ matrix.ruby-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
rustup-toolchain:
- stable
- "1.65"
ruby-version:
- "3.0"
- "3.1"
- "3.2"
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Ruby and Rust
uses: oxidize-rb/actions/[email protected]
with:
rustup-toolchain: ${{ matrix.rustup-toolchain }}
ruby-version: ${{ matrix.ruby-version }}
cache-version: v2
cargo-cache: true
- uses: Swatinem/rust-cache@v2
- name: Run tests
run: cargo test
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: clippy
override: true
- uses: Swatinem/rust-cache@v2
- name: Run Clippy
run: cargo clippy --no-deps -- -D warnings
rustfmt:
name: rustfmt
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: rustfmt
override: true
- name: Check formatting
run: cargo fmt --all -- --check