Skip to content

Commit

Permalink
Build: move build and lint to discrete action steps
Browse files Browse the repository at this point in the history
- only run lint on latest node
  • Loading branch information
timmywil committed Jul 11, 2023
1 parent 66ef8b2 commit 34a3405
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,14 @@ jobs:
run: npx playwright-webkit install-deps
if: "matrix.NPM_SCRIPT == 'test:browser' && contains(matrix.BROWSERS, 'WebkitHeadless')"

- name: Build jQuery
run: npx grunt
if: "matrix.NPM_SCRIPT == 'test:browserless' || matrix.NPM_SCRIPT == 'test:browser' || matrix.NPM_SCRIPT == 'test:esmodules'"

- name: Lint code
run: npm run lint
if: "matrix.NODE_VERSION == '18.x'"

- name: Run tests
env:
BROWSERS: ${{ matrix.BROWSERS }}
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@
"build-all-variants": "grunt custom:slim --esm --filename=jquery.slim.module.js && grunt custom --esm --filename=jquery.module.js && grunt custom:slim --filename=jquery.slim.js && grunt custom",
"jenkins": "npm run test:browserless",
"lint:dev": "eslint .",
"lint:dist": "eslint --no-ignore dist/jquery.js dist/jquery.slim.js dist-module/jquery.module.js dist-module/jquery.slim.module.js",
"lint:dist": "eslint --no-ignore --no-error-on-unmatched-pattern dist/jquery.js dist/jquery.slim.js dist-module/jquery.module.js dist-module/jquery.slim.module.js",
"lint:json": "jsonlint --quiet package.json",
"lint:cache": "concurrently -r \"npm:lint:dev -- --cache\" \"npm:lint:json\"",
"lint": "concurrently -r \"npm:lint:dev\" \"npm:lint:json\" && npm run lint:dist",
"prepare": "husky install",
"start": "grunt watch",
"test:browserless": "grunt && npm run test:node_smoke_tests && grunt test:slow",
"test:browser": "grunt && grunt karma:main",
"test:esmodules": "grunt && grunt karma:esmodules",
"test:browserless": "npm run test:node_smoke_tests && grunt test:slow",
"test:browser": "grunt karma:main",
"test:esmodules": "grunt karma:esmodules",
"test:no-deprecated": "grunt test:prepare && grunt custom:-deprecated && grunt karma:main",
"test:selector-native": "grunt test:prepare && grunt custom:-selector && grunt karma:main",
"test:slim": "grunt test:prepare && grunt custom:slim && grunt karma:main",
Expand All @@ -52,7 +52,7 @@
"test:node_smoke_tests:slim-module": "grunt node_smoke_tests:module:./dist-module/jquery.slim.module.js && grunt node_smoke_tests:module:jquery/slim",
"test:node_smoke_tests:slim-commonjs": "grunt node_smoke_tests:commonjs:./dist/jquery.slim.js && grunt node_smoke_tests:commonjs:jquery/slim",
"test:node_smoke_tests": "npm run test:node_smoke_tests:full-module && npm run test:node_smoke_tests:slim-module && npm run test:node_smoke_tests:full-commonjs && npm run test:node_smoke_tests:slim-commonjs",
"test": "npm run test:browserless && npm run test:slim && npm run test:no-deprecated && npm run test:selector-native && grunt && grunt test:slow && grunt karma:main && grunt karma:esmodules"
"test": "grunt && npm run lint && npm run test:browserless && npm run test:slim && npm run test:no-deprecated && npm run test:selector-native && grunt && grunt test:slow && grunt karma:main && grunt karma:esmodules"
},
"homepage": "https://jquery.com",
"author": {
Expand Down

0 comments on commit 34a3405

Please sign in to comment.