Skip to content

Commit

Permalink
Split prebuild into checks (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
NonSpicyBurrito authored Nov 4, 2024
1 parent e4359be commit a05fde4
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 4 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/check-format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Check Format

on:
push:
branches: ['main']
pull_request:
branches: ['main']

jobs:
check:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 'lts/*'
cache: 'npm'
- run: npm ci
- run: npm run check-format
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Prebuild
name: Check Lint

on:
push:
Expand All @@ -7,7 +7,7 @@ on:
branches: ['main']

jobs:
build:
check:
runs-on: ubuntu-latest

steps:
Expand All @@ -17,4 +17,4 @@ jobs:
node-version: 'lts/*'
cache: 'npm'
- run: npm ci
- run: npm run prebuild
- run: npm run check-lint
20 changes: 20 additions & 0 deletions .github/workflows/check-type.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Check Type

on:
push:
branches: ['main']
pull_request:
branches: ['main']

jobs:
check:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 'lts/*'
cache: 'npm'
- run: npm ci
- run: npm run check-type
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
"type": "module",
"main": "./dist/index.js",
"scripts": {
"prebuild": "tsc -p . --noEmit && eslint . && prettier . --check",
"check-type": "tsc -p . --noEmit",
"check-lint": "eslint .",
"check-format": "prettier . --check",
"build": "tsc -p ."
},
"dependencies": {
Expand Down

0 comments on commit a05fde4

Please sign in to comment.