-
Notifications
You must be signed in to change notification settings - Fork 22
52 lines (47 loc) · 1.35 KB
/
rust.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
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
name: Rust
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
strategy:
matrix:
features: ["", "--no-default-features"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: taiki-e/install-action@nextest
- name: Format
run: cargo fmt --all -- --check
- name: Check
run: cargo check --all-features --all-targets
- name: Clippy
run: cargo clippy --all-features --all-targets -- -D warnings
- name: Build
run: cargo build --verbose ${{ matrix.features }}
- name: Run unit tests
run: cargo nextest run --verbose ${{ matrix.features }} --profile ci --workspace
- name: Run doc tests
run: cargo test --no-fail-fast --doc --workspace
miri:
name: "Miri"
strategy:
matrix:
features: ["", "--no-default-features"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: taiki-e/install-action@nextest
- name: Install Miri
run: |
rustup toolchain install nightly --component miri
rustup override set nightly
cargo miri setup
- name: Test with Miri
run: cargo miri nextest run ${{ matrix.features }} --profile ci --workspace