Skip to content

chore(release): v1.9.0 (+1 more) #697

chore(release): v1.9.0 (+1 more)

chore(release): v1.9.0 (+1 more) #697

Workflow file for this run

name: Build and Test
on:
workflow_dispatch:
workflow_call:
pull_request:
push:
branches:
- main
env:
CARGO_TERM_COLOR: always
jobs:
test:
name: Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v7
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.88.0
components: rustfmt, clippy
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
- name: Verify cargo is on the pinned toolchain
# Self-announcing guard: if `rust-toolchain.toml`, env, or this
# workflow ever drifts, fail loudly instead of silently building
# on a different compiler than intended. The pinned toolchain
# *is* the MSRV, so a mismatch here would mask MSRV regressions.
shell: bash
run: |
v=$(cargo --version | grep -oE '1\.[0-9]+\.[0-9]+' | head -1)
[ "$v" = "1.88.0" ] || { echo "::error::cargo is on $v, expected 1.88.0"; exit 1; }
- name: Build
run: cargo build --workspace --verbose
- name: Run tests
run: cargo test --workspace --verbose
- name: Run clippy
run: cargo clippy --workspace --all-targets --all-features -- -D warnings
- name: Check formatting
run: cargo fmt -- --check
coverage:
name: Code Coverage
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v7
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
components: llvm-tools-preview
toolchain: 1.88.0
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Build
run: cargo build --workspace --verbose
- name: Generate coverage
run: cargo llvm-cov --all-features --workspace --lcov --output-path
lcov.info
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v7
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: jolars/eunoia
fail_ci_if_error: true
files: lcov.info
docs:
name: Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.88.0
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
- name: Build documentation
run: cargo doc --no-deps --all-features
env:
RUSTDOCFLAGS: -D warnings
- name: Run doc tests
run: cargo test --doc
slow-tests:
name: Slow Tests
if: github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.88.0
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
- name: Run ignored slow tests
run: cargo test --workspace -- --ignored
versionary:
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
needs: test
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
issues: write
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
token: ${{ secrets.RELEASE_TOKEN }}
- uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.88.0
- id: versionary
uses: jolars/versionary@v1
with:
token: ${{ secrets.RELEASE_TOKEN }}