Skip to content

Commit 4fbeecb

Browse files
authored
Adding CI on Github Actions. (#3938)
1 parent e9965bf commit 4fbeecb

2 files changed

Lines changed: 27 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: ci
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches: [master]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
matrix:
15+
node-version: [12.x, 14.x, 16.x]
16+
17+
steps:
18+
- uses: actions/checkout@v2
19+
- name: Setup node
20+
uses: actions/setup-node@v2
21+
with:
22+
node-version: ${{ matrix.node }}
23+
- run: npm install
24+
- run: npm test

karma.conf.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,9 @@ module.exports = function(config) {
127127
'Running on Travis.'
128128
);
129129
browsers = ['Firefox'];
130+
} else if (process.env.GITHUB_ACTIONS !== 'false') {
131+
console.log('Running ci on Github Actions.');
132+
browsers = ['FirefoxHeadless', 'ChromeHeadless'];
130133
} else {
131134
console.log('Running locally since SAUCE_USERNAME and SAUCE_ACCESS_KEY environment variables are not set.');
132135
browsers = ['Firefox', 'Chrome'];

0 commit comments

Comments
 (0)