Bump version to 3.1.0 #248
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: Rust CI | |
on: | |
# Always test pull requests | |
pull_request: | |
# Bors related branches | |
push: | |
branches: | |
- master | |
# Test once per week: Saturday at 00:00 | |
schedule: | |
- cron: "0 0 * * 6" | |
permissions: read-all | |
jobs: | |
clippy_check: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ["ubuntu-latest", "windows-latest"] | |
rust: ["stable", "nightly"] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: "Install/Update the Rust version" | |
uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
toolchain: ${{ matrix.rust }} | |
components: clippy | |
- name: clippy "No Default Features" (${{ matrix.os }} / ${{ matrix.rust }}) | |
run: cargo clippy --workspace --no-default-features --all-targets | |
- name: clippy "Default" (${{ matrix.os }} / ${{ matrix.rust }}) | |
run: cargo clippy --workspace --all-targets | |
- name: clippy "All Features" (${{ matrix.os }} / ${{ matrix.rust }}) | |
run: cargo clippy --workspace --all-features --all-targets | |
rustfmt: | |
name: Rustfmt | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
rust: | |
- stable | |
steps: | |
- uses: actions/checkout@v4 | |
- name: "Install/Update the Rust version" | |
uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
components: rustfmt | |
- name: Rustfmt Check (${{ matrix.rust }}) | |
uses: actions-rust-lang/rustfmt@v1 | |
build_and_test: | |
name: Build and Test | |
strategy: | |
matrix: | |
os: ["ubuntu-latest", "windows-latest"] | |
# It is good to test more than the MSRV and stable since sometimes | |
# breakage occurs in intermediate versions. | |
rust: ["stable", "beta", "nightly"] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: "Install/Update the Rust version" | |
uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
toolchain: ${{ matrix.rust }} | |
# The tests are split into build and run steps, to see the time impact of each | |
# cargo test --all-targets does NOT run doctests | |
# since doctests are important this should not be added | |
# https://github.com/rust-lang/cargo/issues/6669 | |
- name: Build (${{ matrix.os }} / ${{ matrix.rust }}) | |
run: cargo build --workspace --all-features --all-targets | |
- name: Test "No Default Features" (${{ matrix.os }} / ${{ matrix.rust }}) | |
run: cargo test --workspace --no-default-features | |
- name: Test "Default" (${{ matrix.os }} / ${{ matrix.rust }}) | |
run: cargo test --workspace | |
- name: Test "All Features" (${{ matrix.os }} / ${{ matrix.rust }}) | |
run: cargo test --workspace --all-features | |
- name: Run cargo-tarpaulin | |
if: matrix.rust == 'stable' && matrix.os == 'ubuntu-latest' | |
run: | | |
cargo install cargo-tarpaulin | |
cargo tarpaulin --out xml --workspace --all-features -- --test-threads=1 | |
env: | |
# https://github.com/xd009642/tarpaulin/issues/1499 | |
CARGO_PROFILE_DEV_DEBUG: 1 | |
- name: Upload to codecov.io | |
uses: codecov/codecov-action@v4 | |
if: matrix.rust == 'stable' && matrix.os == 'ubuntu-latest' | |
# Added to summarize the matrix (otherwise we would need to list every single | |
# job in bors.toml) | |
# https://forum.bors.tech/t/bors-with-github-workflows/426 | |
tests-result: | |
name: Tests result | |
if: always() | |
needs: | |
- rustfmt | |
- clippy_check | |
- build_and_test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Mark the job as a success | |
if: "needs.rustfmt.result == 'success' && needs.clippy_check.result == 'success' && needs.build_and_test.result == 'success'" | |
run: exit 0 | |
- name: Mark the job as a failure | |
if: "!(needs.rustfmt.result == 'success' && needs.clippy_check.result == 'success' && needs.build_and_test.result == 'success')" | |
run: exit 1 |