- name: Test
run: npm run test:unit -- -b safari --jquery ${{ matrix.JQUERY }} --retries 3
-
- legacy-build:
- runs-on: ubuntu-latest
- name: Build on Node 10.x
- env:
- NODE_VERSION: 10.x
- steps:
- - name: Checkout
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
-
- - name: Use Node.js ${{ env.NODE_VERSION }}
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
- with:
- node-version: ${{ env.NODE_VERSION }}
-
- - name: Cache
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
- with:
- path: ~/.npm
- key: ${{ runner.os }}-node-${{ env.NODE_VERSION }}-npm-lock-${{ hashFiles('**/package-lock.json') }}
- restore-keys: |
- ${{ runner.os }}-node-${{ env.NODE_VERSION }}-npm-lock-
-
- - name: Install npm dependencies
- run: npm install
-
- - name: Build
- run: npm run build
"tests/unit/tabs/data/test.html"
];
-const nodeV16OrNewer = !/^v1[0-5]\./.test( process.version );
-
-// Support: Node.js <16
-// Skip running tasks that dropped support for Node.js 10-15
-// in this Node version.
-function runIfNewNode( task ) {
- return nodeV16OrNewer ? task : "print_old_node_message:" + task;
-}
-
function mapMinFile( file ) {
return "dist/" + file.replace( /ui\//, "minified/" );
}
} );
// grunt plugins
-require( "load-grunt-tasks" )( grunt, {
- pattern: nodeV16OrNewer ? [ "grunt-*" ] : [
- "grunt-*",
- "!grunt-eslint",
- "!grunt-html"
- ]
-} );
+require( "load-grunt-tasks" )( grunt );
// local tasks
grunt.loadTasks( "build/tasks" );
// Keep this task list in sync with the testing steps in our GitHub action test workflow file!
grunt.registerTask( "lint", [
"asciilint",
- runIfNewNode( "eslint" ),
+ "eslint",
"csslint",
- runIfNewNode( "htmllint" )
+ "htmllint"
] );
grunt.registerTask( "build", [ "requirejs", "concat" ] );
grunt.registerTask( "default", [ "lint", "build" ] );