-
Notifications
You must be signed in to change notification settings - Fork 345
33 lines (28 loc) · 812 Bytes
/
format.yml
File metadata and controls
33 lines (28 loc) · 812 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
name: Code Formatting
on:
push:
branches: [ master ]
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
# Workaround for some `yarn` nonsense, see:
# https://github.com/yarnpkg/yarn/issues/6312#issuecomment-429685210
- name: Install Dependencies
run: yarn install --network-concurrency 1
- name: Run Linter Checks
run: |
yarn fmt
if ! git diff-index --quiet HEAD; then
echo "::error::Formatting issues detected. Please run 'yarn fmt' locally and commit the changes."
git diff --stat
git diff
exit 1
fi