Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build: Switch from Travis to GitHub actions #2021

Merged
merged 2 commits into from
Nov 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -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!
mgol marked this conversation as resolved.
Show resolved Hide resolved
- 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
mgol marked this conversation as resolved.
Show resolved Hide resolved


1 change: 0 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ tests
.eslintrc.json
.eslintignore
.mailmap
.travis.yml
Gruntfile.js
.csslintrc
.gitattributes
13 changes: 0 additions & 13 deletions .travis.yml

This file was deleted.

1 change: 1 addition & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,7 @@ grunt.registerTask( "update-authors", function() {
} );
} );

// Keep this task list in sync with the testing steps in our GitHub action test workflow file!
grunt.registerTask( "default", [ "lint", "requirejs", "test" ] );
grunt.registerTask( "jenkins", [ "default", "concat" ] );
grunt.registerTask( "lint", [ "asciilint", "eslint", "csslint", "htmllint" ] );
Expand Down