Add cargo workspace lint. #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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" |