Skip to content

Add cargo workspace lint. #1

Add cargo workspace lint.

Add cargo workspace lint. #1

name: "clp-cargo-workspace-check"
on:
pull_request:
push:
schedule:
# Run daily at 00:15 UTC (the 15 is to avoid periods of high load)
- cron: "15 0 * * *"
workflow_dispatch:
concurrency:
group: "${{github.workflow}}-${{github.ref}}"
# Cancel in-progress jobs for efficiency
cancel-in-progress: true
jobs:
cargo-workspace-check:
# For now, Rust components are only needed in the CLP package, which only supports Ubuntu.
runs-on: "ubuntu-22.04"
steps:
- uses: "actions/checkout@v4"
- name: "Install nightly (fmt + clippy)"
uses: "dtolnay/rust-toolchain@nightly"
with:
components: rustfmt, clippy
- name: "Install stable"
uses: "dtolnay/rust-toolchain@stable"
- name: "Install task"
shell: "bash"
run: "npm install -g @go-task/cli"
- name: "Lint"
shell: "bash"
run: "task lint:check-rust"
- name: "Check"
shell: "bash"
run: "cargo check --all --all-features"
- name: "Test"
shell: "bash"
run: "cargo test --all --all-features --release"