-
Notifications
You must be signed in to change notification settings - Fork 14
37 lines (31 loc) · 886 Bytes
/
format-check.yml
File metadata and controls
37 lines (31 loc) · 886 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Format Check
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize]
branches:
- main
jobs:
format-check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup Bun
uses: oven-sh/setup-bun@735343b667d3e6f658f44d0eca948eb6282f2b76 # v2.0.2
with:
bun-version: latest
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Check formatting
run: bun run format:check
- name: Check if files would change
run: |
if ! git diff --exit-code; then
echo "❌ Files are not properly formatted. Run 'bun run format' to fix."
exit 1
else
echo "✅ All files are properly formatted."
fi