Version 4.0.0 #126
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: Continuous Integration | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
paths-ignore: | |
- "README.md" | |
jobs: | |
fmt: | |
name: Source formatting check | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v3 | |
- name: Install Rust toolchain | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
components: rustfmt | |
- name: Check formatting | |
run: cargo fmt --check | |
build: | |
name: Lint and test check | |
strategy: | |
fail-fast: false | |
matrix: | |
rust: ["1.56.0", "stable", "nightly"] | |
os: ["ubuntu-latest", "windows-latest", "macos-latest"] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v3 | |
- name: Install Rust toolchain | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust }} | |
components: clippy | |
- name: Restore cargo cache | |
uses: Swatinem/rust-cache@v2 | |
- name: Run lints | |
run: cargo clippy -- -D warnings | |
- name: Run tests | |
run: | | |
cargo test --all-targets --all-features | |
cargo test --all-targets --no-default-features | |
- name: Install cargo-hack | |
uses: taiki-e/install-action@cargo-hack | |
- name: Run tests with feature powerset | |
# Note: you might think that we can also pass in `--exclude-all-features` here, but that | |
# isn't the case because if you pass in a --example, it doesn't run doctests. The below | |
# expression will run doctests as well. | |
run: cargo hack test --feature-powerset |