-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (50 loc) · 1.25 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
name: test
on:
workflow_dispatch:
pull_request:
push:
branches:
- master
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
RUSTFLAGS: "-D warnings"
jobs:
tests:
name: Tests on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v3
- name: Cache dependencies
uses: Swatinem/[email protected]
- name: Build cargo in release mode
uses: actions-rs/cargo@v1
with:
command: build
args: --release --locked
- name: Run cargo test
run: bin/test --release --locked
# We run tests in debug also, to make sure that the debug_assertions are hit
test-debug:
name: Run tests in debug
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Cache dependencies
uses: Swatinem/[email protected]
- name: Build cargo in debug mode
uses: actions-rs/cargo@v1
with:
command: build
args: --locked
- name: Run tests in debug
run: bin/test --locked