Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enhancement: add GitHub Actions workflow #334

Merged
merged 7 commits into from
Feb 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
on:
push:
branches: [develop, master]
pull_request:
branches: [develop]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [10.x, 12.x, 14.x, 15.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

name: Test and Build with node.js ${{ matrix.node-version }}

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Run Tests and Build
run: |
npm ci
npm test
npm build
24 changes: 24 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Coverage

on:
push:
branches: [develop]

jobs:
coverage:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: "12.x"
- name: Run Tests
run: |
npm ci
npm test
- name: Codacy Coverage Reporter
uses: codacy/[email protected]
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: coverage/lcov.info
2 changes: 2 additions & 0 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,14 @@ module.exports = function (config) {
preferHeadless: true,

postDetection: function (availableBrowsers) {
// ChromeHeadless -> ChromeHeadlessNoSandbox
if (availableBrowsers.includes('ChromeHeadless')) {
const index = availableBrowsers.indexOf('ChromeHeadless');

availableBrowsers[index] = 'ChromeHeadlessNoSandbox';
}

// ChromiumHeadless -> ChromiumHeadlessNoSandbox
if (availableBrowsers.includes('ChromiumHeadless')) {
const index = availableBrowsers.indexOf('ChromiumHeadless');

Expand Down