-
-
Notifications
You must be signed in to change notification settings - Fork 103
71 lines (64 loc) · 1.65 KB
/
tests.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
name: Tests
on: [push, pull_request]
env:
CARGO_TERM_COLOR: always
CLICOLOR_FORCE: 1
RUSTDOCFLAGS: "-Dwarnings"
jobs:
test-latest:
name: Test on Latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
- uses: Swatinem/rust-cache@v2
- name: Test
run: make test
test-stable:
name: Test on 1.61.0
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.61.0
- uses: Swatinem/rust-cache@v2
- name: Use Cargo.lock.msrv
run: cp Cargo.lock.msrv Cargo.lock
- name: Test
run: make cargotest
build-old-stable:
name: Check on 1.51.0
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.51.0
- uses: Swatinem/rust-cache@v2
- name: Use Cargo.lock.msrv
run: cp Cargo.lock.msrv Cargo.lock
- name: Remove named profile
run: |
perl -ni -e 'print unless /\[profile\.dist\]/ .. eof' Cargo.toml
- name: Check
run: cargo check -p insta --no-default-features
build-docs:
name: Build docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
- uses: Swatinem/rust-cache@v2
- name: doc
run: cargo doc --all-features