Skip to content

Commit

Permalink
Adding CI on Github Actions. (#3938)
Browse files Browse the repository at this point in the history
  • Loading branch information
koh110 committed Aug 13, 2021
1 parent e9965bf commit 4fbeecb
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/ci.yml
@@ -0,0 +1,24 @@
name: ci

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [12.x, 14.x, 16.x]

steps:
- uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- run: npm install
- run: npm test
3 changes: 3 additions & 0 deletions karma.conf.js
Expand Up @@ -127,6 +127,9 @@ module.exports = function(config) {
'Running on Travis.'
);
browsers = ['Firefox'];
} else if (process.env.GITHUB_ACTIONS !== 'false') {
console.log('Running ci on Github Actions.');
browsers = ['FirefoxHeadless', 'ChromeHeadless'];
} else {
console.log('Running locally since SAUCE_USERNAME and SAUCE_ACCESS_KEY environment variables are not set.');
browsers = ['Firefox', 'Chrome'];
Expand Down

0 comments on commit 4fbeecb

Please sign in to comment.