Merge pull request #210 from 23prime/dependabot/github_actions/action… #494
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: Check Rust | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - "src/**" | |
| - "Cargo.toml" | |
| - "Cargo.lock" | |
| - ".github/workflows/check-rust.yml" | |
| pull_request: | |
| paths: | |
| - "src/**" | |
| - "Cargo.toml" | |
| - "Cargo.lock" | |
| - ".github/workflows/check-rust.yml" | |
| env: | |
| CARGO_TERM_COLOR: always | |
| permissions: | |
| contents: read | |
| jobs: | |
| check: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| with: | |
| persist-credentials: false | |
| - name: Install Rust | |
| uses: actions-rust-lang/setup-rust-toolchain@46268bd060767258de96ed93c1251119784f2ab6 # v1.16.1 | |
| with: | |
| components: rustfmt, clippy | |
| rustflags: "" | |
| - name: Install mise | |
| uses: jdx/mise-action@1648a7812b9aeae629881980618f079932869151 # v4.0.1 | |
| - name: Fix | |
| run: mise run rs-fix | |
| - name: Commit and Push | |
| uses: 23prime/simple-commit-and-push@15fb653b9591afde3bffb82a906a9af2aede1616 # v1.0.0 | |
| with: | |
| commit-message: "style: Auto fix by workflow" | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Check | |
| run: mise run rs-check | |
| check-windows: | |
| runs-on: windows-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| with: | |
| persist-credentials: false | |
| - name: Install Rust | |
| uses: actions-rust-lang/setup-rust-toolchain@46268bd060767258de96ed93c1251119784f2ab6 # v1.16.1 | |
| - name: Check | |
| run: cargo check --locked |