-
Notifications
You must be signed in to change notification settings - Fork 26
59 lines (44 loc) · 1.69 KB
/
Copy pathtest.yml
File metadata and controls
59 lines (44 loc) · 1.69 KB
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
name: test
on:
pull_request:
push:
branches:
- main
permissions:
contents: read
env:
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
RUSTFLAGS: -Dwarnings
jobs:
test:
name: Rust ${{ matrix.version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
version: ["1.88", stable]
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- uses: dtolnay/rust-toolchain@f7ccc83f9ed1e5b9c81d8a67d7ad1a747e22a561 # 2025-12-17
with:
toolchain: ${{ matrix.version }}
components: rustfmt, clippy
- name: Check formatting
run: cargo fmt --all -- --check
- name: Clippy
run: cargo clippy --profile ci --workspace --lib --tests --examples --all-features -- -D warnings
- name: Check default features
run: cargo check --profile ci --workspace --lib --tests --examples
- name: Check all features
run: cargo check --profile ci --workspace --lib --tests --examples --all-features
- name: Check without default features
run: cargo check --profile ci --workspace --lib --tests --examples --no-default-features
- name: Test library
run: cargo test --profile ci --workspace --all-features --lib
- name: Test derive macro
run: cargo test --profile ci --workspace --all-features --test derive_trybuild
- name: Test auto trait contracts
run: cargo test --profile ci --workspace --all-features --test auto_trait_trybuild
- name: Test documentation
run: cargo test --profile ci --workspace --all-features --doc