Skip to content

Commit de04cc6

Browse files
author
Les Moffat
committed
fix(.github):
-add step to check if build failed silently. - update husky precommit to run typescheck - add typechecking to github action
1 parent 780bf19 commit de04cc6

File tree

4 files changed

+13
-0
lines changed

4 files changed

+13
-0
lines changed

.github/workflows/format-lint.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,6 @@ jobs:
1919

2020
- name: Formatting and linting
2121
run: npm run lint
22+
23+
- name: TypeScript Type Check
24+
run: npx tsc --noEmit

.github/workflows/npm-publish.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,13 @@ jobs:
3232

3333
- name: Make release
3434
run: npm run make
35+
id: makeRelease
3536

37+
- name: Fail job if makeRelease failed
38+
if: steps.makeRelease.outcome == 'failure'
39+
run: exit 1
40+
41+
id: check-build-status
3642
- name: Publish NPM package (regular)
3743
if: "!github.event.release.prerelease"
3844
run: |

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
npx lint-staged;
2+
npx ts-typecheck;
23
npm run test;

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@
5555
"lint-staged": {
5656
"*.ts": "npm run lint:fix"
5757
},
58+
"ts-typecheck": {
59+
"*.ts": "npm tsc --noEmit"
60+
},
5861
"devDependencies": {
5962
"@canvas/image-data": "^1.0.0",
6063
"@eslint/js": "^9.21.0",

0 commit comments

Comments
 (0)