aboutsummaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
authorFelix Nagel <fnagel@users.noreply.github.com>2021-11-30 16:47:11 +0100
committerGitHub <noreply@github.com>2021-11-30 16:47:11 +0100
commite0a78d440048c9a192713c1dac0529cfbacbe993 (patch)
tree9e9a8e26d87325a20a1374d8acaee09577304b45 /.github
parented637b04d75e4ebd6ea523f23e6dee7f64b68145 (diff)
downloadjquery-ui-e0a78d440048c9a192713c1dac0529cfbacbe993.tar.gz
jquery-ui-e0a78d440048c9a192713c1dac0529cfbacbe993.zip
Build: Switch from Travis to GitHub actions
Closes gh-2021
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/test.yml50
1 files changed, 50 insertions, 0 deletions
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
new file mode 100644
index 000000000..184864230
--- /dev/null
+++ b/.github/workflows/test.yml
@@ -0,0 +1,50 @@
+name: Grunt tests
+
+on: [push, pull_request]
+
+jobs:
+ grunt:
+ name: Grunt based tests with Node.js ${{ matrix.node-version }}
+
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ node-version: [12.x, 14.x]
+
+ steps:
+ - uses: actions/checkout@v2
+
+ - uses: actions/setup-node@v1
+ with:
+ node-version: ${{ matrix.node-version }}
+
+ - name: Get npm cache directory
+ id: npm-cache-dir
+ run: |
+ echo "::set-output name=dir::$(npm config get cache)"
+
+ - name: Cache npm dependencies
+ uses: actions/cache@v2
+ 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
+
+