| Philip Zeyliger | 4de80d2 | 2025-04-23 12:33:31 -0700 | [diff] [blame] | 1 | name: Code Formatting |
| 2 | on: |
| 3 | workflow_call: |
| 4 | push: |
| 5 | branches-ignore: |
| 6 | - "queue-main-**" |
| 7 | pull_request: |
| 8 | |
| 9 | jobs: |
| 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 Zeyliger | 2032b1c | 2025-04-23 19:40:42 -0700 | [diff] [blame] | 21 | cache-dependency-path: webui/package-lock.json |
| Philip Zeyliger | 4de80d2 | 2025-04-23 12:33:31 -0700 | [diff] [blame] | 22 | |
| 23 | - name: Install dependencies |
| Philip Zeyliger | 2032b1c | 2025-04-23 19:40:42 -0700 | [diff] [blame] | 24 | working-directory: ./webui |
| Philip Zeyliger | 4de80d2 | 2025-04-23 12:33:31 -0700 | [diff] [blame] | 25 | run: npm ci |
| 26 | |
| Philip Zeyliger | 4de80d2 | 2025-04-23 12:33:31 -0700 | [diff] [blame] | 27 | # 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 Zeyliger | 8b00db1 | 2025-04-25 18:41:38 +0000 | [diff] [blame^] | 39 | - name: Check formatting |
| 40 | run: bin/run-formatters.sh check |