Update changelog for 2.7.0 release, upgrade CI #218
Workflow file for this run
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: CI | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: ["**"] | |
jobs: | |
check: | |
name: Check | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: Swatinem/rust-cache@v2 | |
- name: Run cargo check | |
run: | | |
cargo check | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
build: [beta, stable, windows, macos] | |
include: | |
- build: macos | |
os: macos-latest | |
rust: stable | |
- build: windows | |
os: windows-latest | |
rust: stable | |
- build: beta | |
os: ubuntu-latest | |
rust: beta | |
- build: stable | |
os: ubuntu-latest | |
rust: stable | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: ${{ matrix.rust }} | |
- uses: Swatinem/rust-cache@v2 | |
- uses: taiki-e/install-action@nextest | |
- name: Run tests | |
run: | | |
cargo nextest run | |
test_all_feature_combinations: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: ${{ matrix.rust }} | |
- uses: Swatinem/rust-cache@v2 | |
- uses: taiki-e/install-action@v2 | |
with: | |
tool: cargo-all-features | |
- name: Run tests for all feature combinations | |
run: cargo test-all-features --no-fail-fast --all --locked | |
coverage: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
components: llvm-tools-preview | |
- uses: Swatinem/rust-cache@v2 | |
- uses: taiki-e/install-action@cargo-llvm-cov | |
- uses: taiki-e/install-action@nextest | |
- name: Collect coverage data | |
run: cargo llvm-cov nextest --lcov --output-path lcov.info | |
- name: Upload coverage to codecov | |
uses: codecov/codecov-action@v5 | |
with: | |
files: ./lcov.info | |
token: ${{ secrets.CODECOV_TOKEN }} | |
lints: | |
name: Lints | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
components: "clippy, rustfmt" | |
- uses: Swatinem/rust-cache@v2 | |
- name: Run cargo fmt | |
run: | | |
cargo fmt --all -- --check | |
- name: Run cargo clippy | |
run: | | |
cargo clippy --all -- -D warnings | |
publish: | |
name: Publish (dry-run) | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: Swatinem/rust-cache@v2 | |
- name: Check semver | |
uses: obi1kenobi/cargo-semver-checks-action@v2 | |
with: | |
feature-group: default-features | |
- name: Make sure we can publish the crate | |
run: | | |
cargo publish --dry-run | |
minimum_rust_version: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: "1.74.0" | |
- uses: Swatinem/rust-cache@v2 | |
- name: check if README matches MSRV defined here | |
run: grep '1.74.0' README.md | |
- name: check if Cargo.toml matches MSRV defined here | |
run: grep 'rust-version = "1.74"' Cargo.toml | |
- name: Run tests | |
run: | | |
cargo nextest run | |
wasm: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
target: wasm32-unknown-unknown | |
- uses: Swatinem/rust-cache@v2 | |
- name: Build on wasm | |
run: | | |
cargo build --target wasm32-unknown-unknown --no-default-features --features gz |