linter #11
Workflow file for this run
This file contains 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: linter | |
permissions: | |
contents: read | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
workflow_dispatch: | |
inputs: | |
commit_sha: | |
description: Git commit sha, on which, to run this workflow | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} | |
cancel-in-progress: true | |
jobs: | |
lint_commits: | |
name: Lint Commit Messages | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Check Commit Lint | |
uses: wagoid/[email protected] | |
lint_check: | |
name: Rust - lint_${{ matrix.lint_projects }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
lint_projects: | |
- cargo_fmt_check | |
- cargo_clippy | |
- cargo_deny | |
- cargo_toml_fmt_files | |
- cargo_toml_check_files | |
steps: | |
- name: Run the checkout command | |
uses: actions/checkout@v4 | |
- name: Install rust toolchain | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
profile: minimal | |
toolchain: nightly | |
components: clippy, rustfmt | |
- name: Install development tools | |
uses: taiki-e/install-action@protoc | |
with: | |
tool: just, cargo-deny, dprint | |
- name: Rust Cache | |
uses: actions/cache@v3 | |
continue-on-error: false | |
with: | |
path: | | |
~/.cargo/bin | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-sdk-rust-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: | | |
${{ runner.os }}-sdk-rust- | |
- name: Check cargo version | |
run: cargo --version | |
- name: Run lint ${{ matrix.lint_projects }} | |
run: just -f justfile lint_${{ matrix.lint_projects }} | |