name: Test
on:
push:
branches:
- "*"
pull_request:
branches:
- "*"
env:
CARGO_INCREMENTAL: 0
RUST_BACKTRACE: short
jobs:
test:
runs-on: ${{ matrix.os }}
continue-on-error: true
strategy:
fail-fast: false
matrix:
os:
- macos-latest
- ubuntu-latest
- windows-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Install dependencies (Linux)
if: matrix.os == 'ubuntu-latest'
run: sudo apt install -y gsettings-desktop-schemas
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- name: Rust Cache
uses: Swatinem/rust-cache@ce325b60658c1b38465c06cc965b79baf32c1e72
- name: Run cargo fmt
if: ${{ !cancelled() }}
run: cargo fmt --all -- --check
- name: Run cargo clippy
if: ${{ !cancelled() }}
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Run cargo check
if: ${{ !cancelled() }}
run: cargo check
- name: Run cargo test
if: ${{ !cancelled() }}
shell: bash
run: |
cargo test --all-features -- --nocapture
cargo clean
cargo test --no-default-features -- --nocapture