Skip to content
Merged
Show file tree
Hide file tree
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
122 changes: 0 additions & 122 deletions .github/workflows/pr-auto-commit.yaml

This file was deleted.

56 changes: 56 additions & 0 deletions .github/workflows/pr-format.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Format Check

# This workflow triggers when a PR is opened/updated
# Posts inline suggestion comments instead of auto-committing
on:
pull_request:
types: [opened, synchronize, reopened]
branches:
- main
- release

concurrency:
group: format-check-${{ github.event.pull_request.number }}
cancel-in-progress: true

jobs:
format_check:
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Checkout PR branch
uses: actions/checkout@v4

- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt

- name: Run cargo fmt
run: cargo fmt --all

- name: Install ruff
uses: astral-sh/ruff-action@4919ec5cf1f49eff0871dbcea0da843445b837e6 # v3.6.1
with:
version: "0.15.4"
args: "--version"

- name: Run ruff format
run: ruff format

- name: Run ruff check import sorting
run: ruff check --select I --fix

- name: Run generate_opcode_metadata.py
run: python scripts/generate_opcode_metadata.py

- name: Post formatting suggestions
uses: reviewdog/action-suggester@v1
with:
tool_name: auto-format
github_token: ${{ secrets.GITHUB_TOKEN }}
level: warning
filter_mode: diff_context
Loading