Skip to content

Commit c225a5c

Browse files
committed
build: add workflow to check formatting on pull requests to main
1 parent d040f59 commit c225a5c

2 files changed

Lines changed: 16 additions & 1 deletion

File tree

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Check formatting
2+
on:
3+
pull_request:
4+
branches: [main]
5+
jobs:
6+
format:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v3
10+
- uses: oven-sh/setup-bun@v2
11+
- name: Install dependencies
12+
run: bun install
13+
- name: Check formatting
14+
run: bun format:check

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
"preview": "astro preview",
1111
"astro": "astro",
1212
"lint": "eslint .",
13-
"format": "prettier . --write",
13+
"format:write": "prettier . --write",
14+
"format:check": "prettier . --check",
1415
"prepare": "husky"
1516
},
1617
"dependencies": {

0 commit comments

Comments
 (0)