Skip to content

Fix Rust v1.73 lint warning #5

Fix Rust v1.73 lint warning

Fix Rust v1.73 lint warning #5

# SPDX-FileCopyrightText: slowtec GmbH
# SPDX-License-Identifier: CC0-1.0
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow
name: build-and-test
on:
pull_request:
push:
branches:
- main
workflow_dispatch:
env:
CARGO_INCREMENTAL: 0
CARGO_TERM_COLOR: always
RUST_BACKTRACE: short
jobs:
run:
runs-on: ubuntu-latest
steps:
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Check out repository
uses: actions/checkout@v4
- name: Generate Cargo.lock
run: cargo generate-lockfile
- name: Cache Rust toolchain and build artifacts
uses: Swatinem/rust-cache@v2
with:
# The cache should not be shared between different workflows and jobs.
shared-key: ${{ github.workflow }}-${{ github.job }}
- name: Build tests with default features disabled
run: cargo test --workspace --locked --no-default-features --no-run
- name: Run tests with all features enabled
run: cargo test --workspace --locked --all-features -- --nocapture --quiet
- name: Build workspace documentation with all features enabled
run: cargo doc --workspace --locked --all-features
- name: Build release with default features
run: cargo build --locked --profile release