2020-06-24 18:22:51 +00:00
|
|
|
name: Test
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
2024-06-18 07:52:37 +00:00
|
|
|
- master
|
|
|
|
- staging
|
|
|
|
- trying
|
2020-06-24 18:22:51 +00:00
|
|
|
pull_request:
|
|
|
|
paths:
|
2024-06-18 07:52:37 +00:00
|
|
|
- "**.rs"
|
|
|
|
- "**/Cargo.*"
|
|
|
|
- ".github/workflows/**.yml"
|
|
|
|
- "tests/compile-fail/**.stderr"
|
2023-11-09 10:22:08 +00:00
|
|
|
merge_group:
|
2020-06-24 18:22:51 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
name: Test
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
rust:
|
2024-06-18 07:52:37 +00:00
|
|
|
- stable
|
|
|
|
- beta
|
2020-06-24 18:22:51 +00:00
|
|
|
experimental:
|
2024-06-18 07:52:37 +00:00
|
|
|
- false
|
2020-06-24 18:22:51 +00:00
|
|
|
include:
|
2024-06-18 07:52:37 +00:00
|
|
|
- rust: nightly
|
|
|
|
experimental: true
|
2020-06-24 18:22:51 +00:00
|
|
|
continue-on-error: ${{ matrix.experimental }}
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-06-18 07:52:37 +00:00
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Setup Rust toolchain
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
toolchain: ${{ matrix.rust }}
|
|
|
|
components: rustfmt, clippy
|
|
|
|
default: true
|
|
|
|
- name: Format
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: fmt
|
|
|
|
args: -- --check
|
|
|
|
- name: Clippy
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: clippy
|
|
|
|
args: --all-features --all-targets --workspace
|
|
|
|
- name: Test
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: test
|
|
|
|
args: --all-features --all-targets --workspace
|
|
|
|
- name: Test docs
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: test
|
|
|
|
args: --doc
|
|
|
|
- name: Check (without default features)
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: check
|
|
|
|
args: --no-default-features
|
2023-11-09 22:50:40 +00:00
|
|
|
|
|
|
|
miri:
|
2024-06-18 07:52:37 +00:00
|
|
|
name: Miri
|
2023-11-09 22:50:40 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Install Miri
|
|
|
|
run: |
|
|
|
|
rustup toolchain install nightly --component miri
|
|
|
|
rustup override set nightly
|
|
|
|
cargo miri setup
|
|
|
|
- name: Test with Miri
|
2024-06-18 07:52:37 +00:00
|
|
|
run: cargo miri test --no-fail-fast
|
|
|
|
- name: Run examples with Miri
|
|
|
|
run: |
|
|
|
|
cargo miri run --example calc
|