demos: Replace search.php with $.ajaxTransport() mock #172
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Grunt tests | |
on: [push, pull_request] | |
permissions: | |
contents: read | |
jobs: | |
grunt: | |
name: Grunt based tests with Node.js ${{ matrix.node-version }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
# Node.js 10 is required by jQuery infra | |
node-version: [10.x, 18.x, 20.x] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Get npm cache directory | |
id: npm-cache-dir | |
run: | | |
echo "dir=\"$(npm config get cache)\"" >> $GITHUB_OUTPUT | |
- name: Cache npm dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.npm-cache-dir.outputs.dir }} | |
key: ${{ runner.os }}-node-${{ matrix.node-version }}-npm-${{ hashFiles('**/package.json') }} | |
restore-keys: | | |
${{ runner.os }}-node-${{ matrix.node-version }}-npm- | |
${{ runner.os }}-node-${{ matrix.node-version }}- | |
${{ runner.os }}-node- | |
${{ runner.os }}- | |
- name: Install npm dependencies | |
run: npm install | |
# Keep these steps in sync with the default command tasks in our Gruntfile! | |
- name: Run lint | |
run: node_modules/.bin/grunt lint | |
- name: Run RequireJS | |
run: node_modules/.bin/grunt requirejs | |
- name: Run Qunit | |
run: node_modules/.bin/grunt test | |
valid: | |
name: Build & tests | |
needs: grunt | |
runs-on: ubuntu-latest | |
steps: | |
- name: Grunt based tests passed | |
run: echo "✅" |