-
-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (47 loc) · 1.21 KB
/
unit-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
# SPDX-FileCopyrightText: 2023 Christina Sørensen
# SPDX-FileContributor: Christina Sørensen
#
# SPDX-License-Identifier: AGPL-3.0-only
name: Unit tests
on:
push:
branches: [ main ]
paths:
- '.github/workflows/unit-tests.yml'
- 'src/**'
- 'Cargo.*'
- build.rs
pull_request:
branches: [ main ]
paths:
- '.github/workflows/unit-tests.yml'
- 'src/**'
- 'Cargo.*'
- build.rs
env:
CARGO_TERM_COLOR: always
jobs:
unit-tests:
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.rust == 'nightly' }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
rust: [1.70.0, stable, beta, nightly]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@v1
with:
toolchain: ${{ matrix.rust }}
- name: Install cargo-hack
uses: nick-fields/retry@v3
with:
timeout_minutes: 5
max_attempts: 5
command: cargo install cargo-hack
- name: Run unit tests
run: cargo hack test
- name: Run clippy lints
run: cargo clippy -- -D warnings