Skip to content

Commit

Permalink
Switch to GitHub Actions CI.
Browse files Browse the repository at this point in the history
  • Loading branch information
XhmikosR committed Feb 3, 2021
1 parent 1358c60 commit 108391f
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 20 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Tests

on: [push, pull_request]

env:
FORCE_COLOR: 2

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

strategy:
fail-fast: false
matrix:
node: [8, 10, 12, 14]

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

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

- name: Install npm dependencies
run: npm ci

- name: Run tests
run: npm test
17 changes: 0 additions & 17 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/karma-runner/karma-qunit)
[![npm version](https://img.shields.io/npm/v/karma-qunit.svg?style=flat-square)](https://www.npmjs.com/package/karma-qunit) [![npm downloads](https://img.shields.io/npm/dm/karma-qunit.svg?style=flat-square)](https://www.npmjs.com/package/karma-qunit)

[![Build Status](https://img.shields.io/travis/karma-runner/karma-qunit/master.svg?style=flat-square)](https://travis-ci.org/karma-runner/karma-qunit) [![peerDependencies Status](https://img.shields.io/david/peer/karma-runner/karma-qunit.svg?style=flat-square)](https://david-dm.org/karma-runner/karma-qunit?type=peer) [![devDependency Status](https://img.shields.io/david/dev/karma-runner/karma-qunit.svg?style=flat-square)](https://david-dm.org/karma-runner/karma-qunit?type=dev)
[![Build Status](https://img.shields.io/github/workflow/status/karma-runner/karma-qunit/Tests/master?style=flat-square)](https://github.com/karma-runner/karma-qunit/actions?workflow=Tests)

> Adapter for the [QUnit](https://qunitjs.com/) testing framework.
Expand Down
2 changes: 1 addition & 1 deletion examples/simple/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module.exports = function (config) {

autoWatch: false,

browsers: ['Chrome'],
browsers: process.env.CI ? ['ChromeHeadless'] : ['Chrome'],

singleRun: false,

Expand Down
12 changes: 11 additions & 1 deletion karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
var FIREFOX = process.env.CI ? ['FirefoxHeadless'] : ['Firefox']
var CHROME = process.env.CI ? ['ChromeHeadless'] : ['Chrome']

module.exports = function (config) {
config.set({
frameworks: ['jasmine'],
Expand All @@ -7,7 +10,14 @@ module.exports = function (config) {
'test/src/*.js'
],

browsers: process.env.TRAVIS ? ['Firefox'] : ['Chrome'],
browsers: process.env.CI ? FIREFOX : CHROME,

customLaunchers: {
FirefoxHeadless: {
base: 'Firefox',
flags: ['-headless']
}
},

autoWatch: true
})
Expand Down

0 comments on commit 108391f

Please sign in to comment.