-
Notifications
You must be signed in to change notification settings - Fork 84
61 lines (59 loc) · 1.65 KB
/
test.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
name: Run tests
on: pull_request
env:
CLICOLOR_FORCE: 1
COLORTERM: "truecolor"
jobs:
cargo-fmt:
name: cargo-fmt@stable
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Rust stable
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: rustfmt
- name: Run formatting checks
run: cargo fmt --check
cargo-clippy:
name: "${{ matrix.os }}:cargo-clippy@stable"
runs-on: "${{ matrix.os }}-latest"
strategy:
matrix:
os: ["ubuntu", "windows", "macos"]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Rust stable
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: clippy
- name: Run clippy checks
run: cargo clippy --all-features -- -D warnings
cargo-test:
name: "${{ matrix.os }}:cargo-test@${{ matrix.version }}"
runs-on: "${{ matrix.os }}-latest"
strategy:
matrix:
os: ["ubuntu", "windows", "macos"]
version: ["stable", "beta", "1.70"]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Rust ${{ matrix.version }}
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.version }}
- name: Run tests
run: cargo test
check-semver:
name: Check semver compatibility
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Check semver
uses: obi1kenobi/cargo-semver-checks-action@v2