feat/ci-pipeline #6
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: Lint | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - feat/ci-pipeline-4 | |
| pull_request: | |
| branches: | |
| - main | |
| permissions: | |
| checks: write | |
| contents: write | |
| jobs: | |
| run-linters: | |
| name: Run Rust Linters | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out Git repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install Rust Toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: clippy, rustfmt | |
| - name: Auto-format with rustfmt | |
| run: cargo fmt --all | |
| working-directory: ./priors | |
| - name: Run clippy with auto-fix | |
| run: cargo clippy --all-targets --all-features --fix --allow-dirty -- -D warnings | |
| working-directory: ./priors | |
| - name: Commit changes | |
| uses: stefanzweifel/git-auto-commit-action@v5 | |
| with: | |
| commit_message: "style: auto-format with rustfmt and clippy" | |
| commit_user_name: "github-actions[bot]" | |
| commit_user_email: "github-actions[bot]@users.noreply.github.com" |