Rust CI #3919
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Rust CI | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
schedule: | |
- cron: "0 */6 * * *" | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macOS-latest] | |
rust: | |
- stable | |
- beta | |
- nightly | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: ${{ matrix.rust }} | |
override: true | |
components: rustfmt, clippy | |
- uses: actions-rs/cargo@v1 | |
- name: Run tests | |
run: cargo test --verbose | |
- name: Run tests (without default features) | |
run: cargo test --manifest-path k9/Cargo.toml --no-default-features --verbose | |
- name: Run tests for custom_comparison_formatters (nightly only) | |
run: cargo test --manifest-path k9/Cargo.toml --features custom_comparison_formatters | |
if: ${{ matrix.rust == 'nightly' }} | |
- name: Check formatting | |
run: cargo fmt --all -- --check | |
- name: Lint | |
run: cargo clippy -- -D warnings |