Skip to content

Commit 681cee7

Browse files
authored
Build: Add macOS and Windows to the Travis CI test matrix (#1360)
Update grunt-contrib-qunit to 3.1.0, because grunt-contrib-qunit 3.0.1 uses a pinned (older) version of puppeteer. The older puppteer used an older version of Chrome, which is incompatible with Windows Server 2016, which is what Travis CI offers. AppVeyor was using Windows Server 2012, whih was not affected by that Chrome bug. Ref gruntjs/grunt-contrib-qunit#154. For Windows, the build script is limited to `test:main`. This is the same as it was before with AppVeyor, because the CLI tests are not passing on Windows currently. Ref #1359. Rename bin/qunit to bin/qunit.js, because otherwise ESLint fails: > Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style In theory, it should be possible to add an entry to `.gitattributes` that will apply to bin/qunit what we apply to *.js, but I wasn't able to find a way. Fixes #1347.
1 parent fd53f74 commit 681cee7

File tree

9 files changed

+27
-39
lines changed

9 files changed

+27
-39
lines changed

.travis.yml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,28 @@
1+
os: linux
12
language: node_js
23
node_js:
3-
- "6"
4-
- "8"
54
- "10"
5+
- "8"
6+
- "6"
67
env:
78
- NPM_SCRIPT=test
8-
- NPM_SCRIPT=test:cli
99
matrix:
1010
fast_finish: true
1111
include:
12-
- node_js: "10"
12+
- os: windows
13+
# On Windows, test only the last LTS.
14+
node_js: "10"
15+
# On Windows, run test:main only instead of test.
16+
# https://github.com/qunitjs/qunit/issues/1359
17+
# On Windows, disable yarn-gpg due to it causing the
18+
# build to never finish (background process)
19+
# https://travis-ci.community/t/timeout-after-build-finished-and-succeeded/1336
20+
env: NPM_SCRIPT=test:main YARN_GPG=no
21+
- os: osx
22+
# On Mac, test only the last LTS.
23+
node_js: "10"
24+
- os: linux
25+
node_js: "10"
1326
env: NPM_SCRIPT=coverage
1427
script:
1528
- npm run $NPM_SCRIPT

Gruntfile.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ module.exports = function( grunt ) {
8989
},
9090
js: [
9191
"*.js",
92-
"bin/qunit",
9392
"bin/**/*.js",
9493
"reporter/**/*.js",
9594
"runner/**/*.js",

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
[![Travis Build Status](https://travis-ci.org/qunitjs/qunit.svg?branch=master)](https://travis-ci.org/qunitjs/qunit)
2-
[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/qunitjs/qunit?svg=true&branch=master)](https://ci.appveyor.com/project/leobalter/qunit)
1+
[![Build Status](https://travis-ci.org/qunitjs/qunit.svg?branch=master)](https://travis-ci.org/qunitjs/qunit)
32
[![Coverage Status](https://coveralls.io/repos/qunitjs/qunit/badge.svg)](https://coveralls.io/github/qunitjs/qunit)
43
[![Chat on Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/qunitjs/qunit?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
54
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fqunitjs%2Fqunit.svg?type=shield)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fqunitjs%2Fqunit?ref=badge_shield)

appveyor.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.
File renamed without changes.

package.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
},
2323
"license": "MIT",
2424
"bin": {
25-
"qunit": "bin/qunit"
25+
"qunit": "bin/qunit.js"
2626
},
2727
"files": [
2828
"bin/",
@@ -60,7 +60,7 @@
6060
"grunt-concurrent": "2.3.1",
6161
"grunt-contrib-connect": "1.0.2",
6262
"grunt-contrib-copy": "1.0.0",
63-
"grunt-contrib-qunit": "3.0.1",
63+
"grunt-contrib-qunit": "3.1.0",
6464
"grunt-contrib-watch": "1.1.0",
6565
"grunt-coveralls": "2.0.0",
6666
"grunt-eslint": "20.1.0",
@@ -79,9 +79,10 @@
7979
"scripts": {
8080
"build": "grunt build",
8181
"dev": "grunt watch",
82-
"test": "grunt",
83-
"coverage": "grunt coverage",
84-
"test:cli": "grunt build && bin/qunit test/cli/*.js"
82+
"test": "grunt && bin/qunit.js test/cli/*.js",
83+
"test:main": "grunt",
84+
"test:cli": "grunt build && bin/qunit.js test/cli/*.js",
85+
"coverage": "grunt coverage"
8586
},
8687
"commitplease": {
8788
"components": [

test/cli/fixtures/expected/tap-outputs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ ok 1 Single > has a test
200200
# todo 0
201201
# fail 0`,
202202

203-
"node --expose-gc --allow-natives-syntax ../../../bin/qunit memory-leak/*.js":
203+
"node --expose-gc --allow-natives-syntax ../../../bin/qunit.js memory-leak/*.js":
204204
`TAP version 13
205205
ok 1 some nested module > can call method on foo
206206
ok 2 later thing > has released all foos

test/cli/helpers/execute.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ module.exports = function execute( command, execaOptions ) {
1010
const cwd = process.cwd();
1111
process.chdir( path.join( __dirname, "..", "fixtures" ) );
1212

13-
command = command.replace( /^qunit\b/, "../../../bin/qunit" );
13+
command = command.replace( /^qunit\b/, "../../../bin/qunit.js" );
1414
const execution = exec( command, execaOptions );
1515

1616
process.chdir( cwd );

test/cli/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ QUnit.module( "CLI Main", function() {
139139

140140
if ( semver.gte( process.versions.node, "9.0.0" ) ) {
141141
QUnit.test( "callbacks and hooks from modules are properly released for garbage collection", co.wrap( function* ( assert ) {
142-
const command = "node --expose-gc --allow-natives-syntax ../../../bin/qunit memory-leak/*.js";
142+
const command = "node --expose-gc --allow-natives-syntax ../../../bin/qunit.js memory-leak/*.js";
143143
const execution = yield execute( command );
144144

145145
assert.equal( execution.code, 0 );

0 commit comments

Comments
 (0)