-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (37 loc) · 894 Bytes
/
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
name: Run tests
on:
push:
paths:
- "src/**"
- "tests/**"
- "examples/**"
- "Cargo.toml"
- "Cargo.lock"
- "build.rs"
- ".github/workflows/test.yml"
pull_request:
branches:
- master
- "release/*"
env:
RUST_BACKTRACE: short
RUSTFLAGS: '-D warnings'
jobs:
test:
name: Run tests
runs-on: ubuntu-latest
steps:
- name: Check out sources
uses: actions/checkout@v3
- name: Set up Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Cache build artifacts
uses: Swatinem/rust-cache@v2
- name: Lint code
run: cargo clippy --all-targets
- name: Compile tests
run: cargo test --workspace --no-fail-fast --no-run --locked
- name: Run tests
run: cargo test --workspace --no-fail-fast