blob: 61c5d75070c3c2159f07caeafa920b79cda7eaba [file] [log] [blame]
Philip Zeyliger4de80d22025-04-23 12:33:31 -07001name: Code Formatting
2on:
3 workflow_call:
4 push:
5 branches-ignore:
6 - "queue-main-**"
7 pull_request:
8
9jobs:
10 formatting:
11 runs-on: ubuntu-latest
12 steps:
13 - uses: actions/checkout@v4
14
15 # Setup for Prettier
16 - name: Setup Node.js
17 uses: actions/setup-node@v4
18 with:
19 node-version: '20'
20 cache: 'npm'
Philip Zeyliger2032b1c2025-04-23 19:40:42 -070021 cache-dependency-path: webui/package-lock.json
Philip Zeyliger4de80d22025-04-23 12:33:31 -070022
23 - name: Install dependencies
Philip Zeyliger2032b1c2025-04-23 19:40:42 -070024 working-directory: ./webui
Philip Zeyliger4de80d22025-04-23 12:33:31 -070025 run: npm ci
26
Philip Zeyliger4de80d22025-04-23 12:33:31 -070027 # Setup for gofumpt
28 - name: Setup Go
29 uses: actions/setup-go@v4
30 with:
31 go-version: stable
32 cache: true
33
34 - name: Install gofumpt v0.8.0
35 run: |
36 go install mvdan.cc/gofumpt@v0.8.0
37 echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
38
Philip Zeyliger8b00db12025-04-25 18:41:38 +000039 - name: Check formatting
40 run: bin/run-formatters.sh check