Fix GitHub workflow #18
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: Test & Lint | |
on: | |
push: | |
branches: ["*"] | |
paths: | |
- ".github/workflows/test.yml" | |
- "**/*.rs" | |
- "**/*.md" # Test examples in markdowns included as API doc | |
- "**/Cargo.toml" | |
pull_request: | |
branches: ["*"] | |
paths: | |
- ".github/workflows/test.yml" | |
- "**/*.rs" | |
- "**/*.md" # Test examples in markdowns included as API doc | |
- "**/Cargo.toml" | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
timeout-minutes: 2 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
components: rustfmt, clippy | |
- name: Lint | |
run: cargo clippy --verbose -- -D warnings | |
test: | |
needs: lint | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
rust: [stable, beta, nightly] | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 2 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust }} | |
components: rustfmt, clippy | |
- name: Build | |
run: cargo build --verbose | |
- name: Test | |
run: cargo test --verbose -- --show-output --include-ignored |