From 998e18dcf651d8fc09c70df8f3ee01ec8df202fe Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Fri, 17 Dec 2021 08:56:42 +0200 Subject: [PATCH] Switch to GitHub Actions CI and add Node.js 16 to the matrix --- .github/workflows/test.yml | 39 ++++++++++++++++++++++++++++++++++++++ .travis.yml | 24 ----------------------- README.md | 4 +--- karma.conf.js | 2 +- 4 files changed, 41 insertions(+), 28 deletions(-) create mode 100644 .github/workflows/test.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..7641662 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,39 @@ +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: [10, 12, 14, 16] + + steps: + - name: Clone repository + uses: actions/checkout@v2 + + - name: Set up Node.js + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node }} + cache: npm + + - name: Install npm dependencies + run: npm ci + + - name: Run tests + run: grunt && ./integration-tests.sh + + # FIXME + # run automated release process with semantic-release +# - if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_EVENT_TYPE" == "push" && "$TRAVIS_NODE_VERSION" == "12" ]]; then +# npm i --no-save semantic-release@15 @semantic-release/changelog@3 @semantic-release/git@7; +# semantic-release; +# fi; diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index ab30f32..0000000 --- a/.travis.yml +++ /dev/null @@ -1,24 +0,0 @@ -language: node_js - -node_js: - - "10" - - "12" - - "14" - -services: - - xvfb - -before_script: - - export DISPLAY=:99.0 - -script: - - grunt && ./integration-tests.sh - -after_success: - # run automated release process with semantic-release - - if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_EVENT_TYPE" == "push" && "$TRAVIS_NODE_VERSION" == "12" ]]; then - npm i --no-save semantic-release@15 @semantic-release/changelog@3 @semantic-release/git@7; - semantic-release; - fi; - -cache: npm diff --git a/README.md b/README.md index 1a06481..835a2c5 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,6 @@ # karma-jasmine -[![npm version](https://img.shields.io/npm/v/karma-jasmine.svg?style=flat-square)](https://www.npmjs.com/package/karma-jasmine) [![npm downloads](https://img.shields.io/npm/dm/karma-jasmine.svg?style=flat-square)](https://www.npmjs.com/package/karma-jasmine) - -[![Build Status](https://img.shields.io/travis/karma-runner/karma-jasmine/master.svg?style=flat-square)](https://travis-ci.org/karma-runner/karma-jasmine) [![Dependency Status](https://img.shields.io/david/karma-runner/karma-jasmine.svg?style=flat-square)](https://david-dm.org/karma-runner/karma-jasmine) [![devDependency Status](https://img.shields.io/david/dev/karma-runner/karma-jasmine.svg?style=flat-square)](https://david-dm.org/karma-runner/karma-jasmine?type=dev) +[![npm version](https://img.shields.io/npm/v/karma-jasmine.svg?style=flat-square)](https://www.npmjs.com/package/karma-jasmine) [![npm downloads](https://img.shields.io/npm/dm/karma-jasmine.svg?style=flat-square)](https://www.npmjs.com/package/karma-jasmine) [![Build Status](https://img.shields.io/travis/karma-runner/karma-jasmine/master.svg?style=flat-square)](https://travis-ci.org/karma-runner/karma-jasmine) [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/karma-runner/karma-jasmine) [![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release) diff --git a/karma.conf.js b/karma.conf.js index f9cb450..9c44919 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -8,7 +8,7 @@ module.exports = function (config) { 'test/*.js' ], - browsers: process.env.TRAVIS ? ['Firefox'] : ['Chrome'], + browsers: process.env.CI ? ['FirefoxHeadless'] : ['ChromeHeadless'], autoWatch: true,