File tree Expand file tree Collapse file tree 2 files changed +56
-122
lines changed
Expand file tree Collapse file tree 2 files changed +56
-122
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ name : Format Check
2+
3+ # This workflow triggers when a PR is opened/updated
4+ # Posts inline suggestion comments instead of auto-committing
5+ on :
6+ pull_request :
7+ types : [opened, synchronize, reopened]
8+ branches :
9+ - main
10+ - release
11+
12+ concurrency :
13+ group : format-check-${{ github.event.pull_request.number }}
14+ cancel-in-progress : true
15+
16+ jobs :
17+ format_check :
18+ permissions :
19+ contents : read
20+ pull-requests : write
21+ runs-on : ubuntu-latest
22+ timeout-minutes : 60
23+ steps :
24+ - name : Checkout PR branch
25+ uses : actions/checkout@v4
26+
27+ - name : Setup Rust
28+ uses : dtolnay/rust-toolchain@stable
29+ with :
30+ components : rustfmt
31+
32+ - name : Run cargo fmt
33+ run : cargo fmt --all
34+
35+ - name : Install ruff
36+ uses : astral-sh/ruff-action@4919ec5cf1f49eff0871dbcea0da843445b837e6 # v3.6.1
37+ with :
38+ version : " 0.15.4"
39+ args : " --version"
40+
41+ - name : Run ruff format
42+ run : ruff format
43+
44+ - name : Run ruff check import sorting
45+ run : ruff check --select I --fix
46+
47+ - name : Run generate_opcode_metadata.py
48+ run : python scripts/generate_opcode_metadata.py
49+
50+ - name : Post formatting suggestions
51+ uses : reviewdog/action-suggester@v1
52+ with :
53+ tool_name : auto-format
54+ github_token : ${{ secrets.GITHUB_TOKEN }}
55+ level : warning
56+ filter_mode : diff_context
You can’t perform that action at this time.
0 commit comments