Skip to content

Commit

Permalink
Ensure the build fails on format/lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Barry Gordon committed Feb 10, 2022
1 parent de2b791 commit 8ba73ea
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,14 @@ jobs:
- name: Install NPM dependencies
run: npm ci

- name: Check formatting
run: npm run format-check

- name: Run linter
run: npm run lint-check

- name: Run tests
run: npm run all
run: npm run test

- run: git diff --quiet dist/
test: # make sure the action works on a clean machine without building
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
"main": "src/main.ts",
"scripts": {
"format": "prettier --write **/*.ts",
"format-check": "prettier --check **/*.ts",
"lint": "eslint --fix **/*.ts",
"lint-check": "eslint **/*.ts",
"package": "ncc build -o dist/main src/main.ts --source-map --license licenses.txt && ncc build -o dist/cleanup src/cleanup.ts --source-map --license licenses.txt",
"test": "SKIP_INTEGRATION_TESTS=true jest --detectOpenHandles",
"test-integration": "jest --detectOpenHandles 'integration'",
Expand Down

0 comments on commit 8ba73ea

Please sign in to comment.