-
Notifications
You must be signed in to change notification settings - Fork 22
61 lines (49 loc) · 1.35 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
name: Tests
on:
push:
branches: [master]
pull_request:
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- build: pinned # don't rename
os: ubuntu-latest
rust: 1.56.0
- build: beta
os: ubuntu-latest
rust: beta
- build: nightly
os: ubuntu-latest
rust: nightly
steps:
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
if: ${{ matrix.build }} != "pinned"
- name: Install Rust With Components
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
components: rustfmt, clippy
if: ${{ matrix.build }} == "pinned"
- uses: actions/checkout@v4
- name: check formatting
run: cargo fmt -- --check
if: ${{ matrix.build }} == "pinned"
- name: check code
run: cargo check --verbose
- name: check clippy
run: cargo clippy --verbose
if: ${{ matrix.build }} == "pinned"
- name: run tests
run: cargo test --verbose
- name: Interactive debug
uses: mxschmitt/action-tmate@v3
if: failure() && github.event_name == 'workflow_dispatch'