Skip to content

ci(deps): update dtolnay/rust-toolchain digest to 3c5f7ea #307

ci(deps): update dtolnay/rust-toolchain digest to 3c5f7ea

ci(deps): update dtolnay/rust-toolchain digest to 3c5f7ea #307

Workflow file for this run

name: Rust
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: "-Dwarnings"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
submodules: true
- name: Cache Cargo dependencies
uses: Swatinem/rust-cache@f13886b937689c021905a6b90929199931d60db1 # v2.8.1
- name: Build
run: cargo build --verbose
- name: Run tests
run: |
cargo test --verbose -- --include-ignored
cargo test --verbose --all-features -- --include-ignored
- name: Run Clippy
run: cargo clippy --all-targets
- name: Run Format Check
run: cargo fmt --check
check-msrv:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
submodules: true
- name: Get MSRV
id: msrv
run: echo "msrv=$(cargo metadata --no-deps --format-version=1 | jq -r ".packages[] | select(.name==\"jlabel\") | .rust_version")" >> $GITHUB_OUTPUT
- name: Install Rust
uses: dtolnay/rust-toolchain@efa25f7f19611383d5b0ccf2d1c8914531636bf9 # master
with:
toolchain: ${{ steps.msrv.outputs.msrv }}
- name: Cache Cargo dependencies
uses: Swatinem/rust-cache@f13886b937689c021905a6b90929199931d60db1 # v2.8.1
- name: Print version
run: |
cargo --version
rustc --version
- name: Run test
run: |
cargo test --verbose
cargo test --verbose --all-features
coverage:
runs-on: ubuntu-latest
container:
image: xd009642/tarpaulin:develop-nightly@sha256:787cae06b544bdcfa8f9c60f17734e6e660031d4a4791766a9392983f2feb20c
options: --security-opt seccomp=unconfined
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
submodules: true
- name: Generate code coverage
run: cargo tarpaulin --verbose --all-features --workspace --timeout 120 --out xml
- name: Upload to codecov.io
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true