Skip to content

ci(deps): update actions/checkout action to v6 #378

ci(deps): update actions/checkout action to v6

ci(deps): update actions/checkout action to v6 #378

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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
submodules: true
- name: Cache Cargo dependencies
uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
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@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9 # master
with:
toolchain: ${{ steps.msrv.outputs.msrv }}
- name: Cache Cargo dependencies
uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.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:9b7db494e7b9019077128f07708933ea39ca50af360015c33c1be675bb853abe
options: --security-opt seccomp=unconfined
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
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@75cd11691c0faa626561e295848008c8a7dddffe # v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true