Skip to content

Try to fix logging in tests again #98

Try to fix logging in tests again

Try to fix logging in tests again #98

Workflow file for this run

name: Validate
on:
push:
branches: ["**"]
pull_request:
permissions:
contents: read
env:
RUST_MSRV: 1.82.0
CARGO_INCREMENTAL: 0
CARGO_PROFILE_TEST_DEBUG: 0
jobs:
rustfmt:
name: Check rustfmt formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Run rustfmt
run: |
rustup component add rustfmt
cargo fmt --check
clippy:
name: Check Clippy lints
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: Swatinem/rust-cache@v2
- name: Run Clippy
run: |
rustup component add clippy
cargo clippy --all-targets -- -D warnings
build-msrv:
name: Build on MSRV
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: Swatinem/rust-cache@v2
- name: Build
run: |
rustup toolchain install ${RUST_MSRV}-x86_64-unknown-linux-gnu
rustup override set ${RUST_MSRV}-x86_64-unknown-linux-gnu
cargo build --locked
tests:
name: Run tests on MSRV
runs-on: ubuntu-latest
env:
CARGO_LLVM_COV_VERSION: 0.6.16
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: Swatinem/rust-cache@v2
- name: Install cargo-llvm-cov
run: |
wget https://github.com/taiki-e/cargo-llvm-cov/releases/download/v${CARGO_LLVM_COV_VERSION}/cargo-llvm-cov-x86_64-unknown-linux-gnu.tar.gz \
-O /tmp/cargo-llvm-cov.tar.gz
tar -xvzf /tmp/cargo-llvm-cov.tar.gz -C ${HOME}/.cargo/bin
- name: Test
run: |
rustup toolchain install ${RUST_MSRV}-x86_64-unknown-linux-gnu
rustup override set ${RUST_MSRV}-x86_64-unknown-linux-gnu
cargo llvm-cov --verbose --codecov --locked --output-path codecov.json
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
with:
files: ./codecov.json
token: ${{ secrets.CODECOV_TOKEN }}
build:
if: github.ref == 'refs/heads/main'
permissions:
contents: read
packages: write
needs:
- rustfmt
- clippy
- build-msrv
- tests
uses: ./.github/workflows/build.yml
secrets: inherit