Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

auto fix lint issues via CI #507

Merged
merged 3 commits into from
Oct 19, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/benchmark.yml → .github/workflows/bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,39 @@ jobs:
with:
sha: ${{github.event.pull_request.head.sha}}
body: ${{steps.get_comment_body.outputs.body}}

lint:
name: CI:Lint
if: contains(github.event.pull_request.labels.*.name, 'ci:lint')
runs-on: ubuntu-latest
permissions:
pull-requests: write
contents: write
steps:
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: "18"
- name: Install Prettier
run: npm install --global prettier
- name: Install Stable Toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
components: rustfmt, clippy
- name: Cache Rust Dependencies
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- uses: actions/checkout@v4
- name: Run lint script
run: ./lint.sh
- name: Commit and push if changed
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "style: apply lint fixes"
tusharmath marked this conversation as resolved.
Show resolved Hide resolved
Loading