Skip to content

Commit

Permalink
Update tests and dependencies (#230)
Browse files Browse the repository at this point in the history
* Update tests

* Update deps

* Switch to Github Actions

* Use npx
  • Loading branch information
vladikoff authored Dec 12, 2020
1 parent 5759edd commit b70c1d9
Show file tree
Hide file tree
Showing 12 changed files with 6,233 additions and 3,115 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Tests
on: [push, pull_request]
env:
CI: true

jobs:
run:
name: Node ${{ matrix.node }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
node: [10, 12, 14]
os: [ubuntu-latest, windows-latest]

steps:
- name: Clone repository
uses: actions/checkout@v2

- name: Set Node.js version
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}

- name: Install npm dependencies
run: npm ci

- name: Run tests
run: npm test

# We test multiple Windows shells because of prior stdout buffering issues
# filed against Grunt. https://github.com/joyent/node/issues/3584
- name: Run PowerShell tests
run: "npm test # PowerShell" # Pass comment to PS for easier debugging
shell: powershell
if: startsWith(matrix.os, 'windows')
3 changes: 2 additions & 1 deletion .jshintrc
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@
"node": true,
"sub": true,
"undef": true,
"unused": true
"unused": true,
"esversion": 6
}
11 changes: 0 additions & 11 deletions .travis.yml

This file was deleted.

11 changes: 7 additions & 4 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ module.exports = function(grunt) {
all: [
'Gruntfile.js',
'tasks/*.js',
'<%= nodeunit.tests %>'
'tests/*.js'
],
options: {
jshintrc: '.jshintrc'
Expand Down Expand Up @@ -239,8 +239,10 @@ module.exports = function(grunt) {
},

// Unit tests.
nodeunit: {
tests: ['test/*_test.js']
run: {
jest: {
exec: 'npx jest',
}
}
});

Expand All @@ -253,10 +255,11 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-nodeunit');
grunt.loadNpmTasks('grunt-contrib-internal');
grunt.loadNpmTasks('grunt-run');

// Whenever the "test" task is run, first clean the "tmp" dir, then run this
// plugin's task(s), then test the result.
grunt.registerTask('test', ['jshint', 'clean', 'copy', 'compress', 'nodeunit']);
grunt.registerTask('test', ['jshint', 'clean', 'copy', 'compress', 'run:jest']);

// By default, lint and run all tests.
grunt.registerTask('default', ['test', 'contrib-ci:skipIfExists', 'build-contrib']);
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# grunt-contrib-compress v1.6.0 [![Build Status: Linux](https://travis-ci.org/gruntjs/grunt-contrib-compress.svg?branch=master)](https://travis-ci.org/gruntjs/grunt-contrib-compress) [![Build Status: Windows](https://ci.appveyor.com/api/projects/status/tiwbi1smm1j8aa5j/branch/master?svg=true)](https://ci.appveyor.com/project/gruntjs/grunt-contrib-compress/branch/master)
# grunt-contrib-compress v2.0.0 [![Build Status](https://github.com/gruntjs/grunt-contrib-compress/workflows/Tests/badge.svg)](https://github.com/gruntjs/grunt-contrib-compress/actions?workflow=Tests)

> Compress files and folders
Expand Down Expand Up @@ -329,4 +329,4 @@ compress: {

Task submitted by [Chris Talkington](http://christalkington.com/)

*This file was generated on Mon Oct 21 2019 10:25:59.*
*This file was generated on Sat Dec 12 2020 13:29:16.*
34 changes: 0 additions & 34 deletions appveyor.yml

This file was deleted.

Loading

0 comments on commit b70c1d9

Please sign in to comment.