-
-
Notifications
You must be signed in to change notification settings - Fork 7
28 lines (24 loc) · 733 Bytes
/
format-check.yml
File metadata and controls
28 lines (24 loc) · 733 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
name: Format Check
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
format-check:
runs-on: macos-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v3
- name: Use Node.js (LTS)
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v3
with:
node-version: 'lts/*'
- name: Install dependencies
run: npm install
- name: Check formatting
# Run prettier in check mode (doesn't modify files)
run: npm run format:check
- name: Format instructions (if check fails)
if: ${{ failure() }}
run: |
echo "::error::Formatting issues detected. Run 'npm run format' locally to fix."