Skip to content

Commit cb4e0c9

Browse files
authored
chore(ci): add style check workflow (#58)
* chore(ci): add style check workflow * chore(ci/style): show helpful error message on failure
1 parent 428ed32 commit cb4e0c9

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

.github/workflows/style.yml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Style Check
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
check:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v3
15+
- name: Use Node.js 19
16+
uses: actions/setup-node@v3
17+
with:
18+
node-version: 19
19+
- run: npm install
20+
- run: npx rescript format -all -check
21+
- name: Helpful error message
22+
if: failure()
23+
run: echo "::error::Incorrect formatting. Please run 'npx rescript format -all' and commit the changes."

0 commit comments

Comments
 (0)