-
-
Notifications
You must be signed in to change notification settings - Fork 7
55 lines (52 loc) · 1.53 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
on:
push:
branches:
- main
pull_request:
branches:
- main
name: CI
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
env:
RUSTFLAGS: -D warnings
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- uses: Swatinem/rust-cache@a22603398250b864f7190077025cf752307154dc # v2
- name: Lint (rustfmt)
run: cargo xfmt --check
- name: Lint (clippy)
run: cargo clippy --all-features --all-targets
build:
name: Build and test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
# 1.60 is the MSRV
rust-version: [ "1.60", stable ]
fail-fast: false
env:
RUSTFLAGS: -D warnings
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: dtolnay/rust-toolchain@1482605bfc5719782e1267fd0c0cc350fe7646b8 # v1
with:
toolchain: ${{ matrix.rust-version }}
- uses: Swatinem/rust-cache@a22603398250b864f7190077025cf752307154dc # v2
- name: Build
run: cargo build
- name: Install nextest
uses: taiki-e/install-action@nextest
- name: Test
run: cargo nextest run --all-features
- name: Delete Cargo.lock and test against latest versions
if: matrix.rust-version == 'stable'
run: |
rm Cargo.lock
cargo nextest run --all-features