Skip to content

Commit 97e02b4

Browse files
authored
enhancement: add GitHub Actions workflow (#334)
1 parent 51cb217 commit 97e02b4

File tree

3 files changed

+53
-0
lines changed

3 files changed

+53
-0
lines changed

.github/workflows/build.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
on:
2+
push:
3+
branches: [develop, master]
4+
pull_request:
5+
branches: [develop]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
11+
strategy:
12+
matrix:
13+
node-version: [10.x, 12.x, 14.x, 15.x]
14+
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
15+
16+
name: Test and Build with node.js ${{ matrix.node-version }}
17+
18+
steps:
19+
- uses: actions/checkout@v2
20+
- uses: actions/setup-node@v1
21+
with:
22+
node-version: ${{ matrix.node-version }}
23+
- name: Run Tests and Build
24+
run: |
25+
npm ci
26+
npm test
27+
npm build

.github/workflows/coverage.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Coverage
2+
3+
on:
4+
push:
5+
branches: [develop]
6+
7+
jobs:
8+
coverage:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v2
13+
- uses: actions/setup-node@v2
14+
with:
15+
node-version: "12.x"
16+
- name: Run Tests
17+
run: |
18+
npm ci
19+
npm test
20+
- name: Codacy Coverage Reporter
21+
uses: codacy/[email protected]
22+
with:
23+
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
24+
coverage-reports: coverage/lcov.info

karma.conf.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,14 @@ module.exports = function (config) {
5252
preferHeadless: true,
5353

5454
postDetection: function (availableBrowsers) {
55+
// ChromeHeadless -> ChromeHeadlessNoSandbox
5556
if (availableBrowsers.includes('ChromeHeadless')) {
5657
const index = availableBrowsers.indexOf('ChromeHeadless');
5758

5859
availableBrowsers[index] = 'ChromeHeadlessNoSandbox';
5960
}
6061

62+
// ChromiumHeadless -> ChromiumHeadlessNoSandbox
6163
if (availableBrowsers.includes('ChromiumHeadless')) {
6264
const index = availableBrowsers.indexOf('ChromiumHeadless');
6365

0 commit comments

Comments
 (0)