Skip to content

Commit

Permalink
Check for unstaged changes after npm run build
Browse files Browse the repository at this point in the history
  • Loading branch information
colinrotherham committed Jan 18, 2024
1 parent 7a0a346 commit 1b743e4
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/integration_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ jobs:
- name: Install dependencies
run: npm ci

# Run build without postbuild checks
- name: Build
run: npm run build
run: npm run build --ignore-scripts

- name: Run browser tests (without Sauce Labs)
run: npm run wdio:test
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/saucelabs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ jobs:
- name: Install dependencies
run: npm ci

# Run build without postbuild checks
- name: Build
run: npm run build
run: npm run build --ignore-scripts

- name: Run browser tests (with Sauce Labs)
run: npm run wdio:test
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ jobs:
- name: Install dependencies
run: npm ci

# Run build without postbuild checks
- name: Build
run: npm run build
run: npm run build --ignore-scripts

- name: Functional tests (Chromium)
run: npm run karma
Expand Down
3 changes: 2 additions & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npm run build && node scripts/check-staged.mjs
# Run build with postbuild check for unstaged changes
npm run build
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"build:css": "csso src/autocomplete.css -o dist/accessible-autocomplete.min.css",
"build:js": "cross-env NODE_ENV=production webpack --progress",
"build": "run-s \"build:js\" \"build:css\"",
"postbuild": "node scripts/check-staged.mjs",
"dev": "cross-env NODE_ENV=development webpack-dev-server",
"karma:dev": "cross-env NODE_ENV=test karma start test/karma.config.js",
"karma": "npm run karma:dev -- --single-run",
Expand Down

0 comments on commit 1b743e4

Please sign in to comment.