-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
99d6236
commit 7b01bb3
Showing
8 changed files
with
6,868 additions
and
5,671 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
name: ci | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
should-skip: | ||
continue-on-error: true | ||
runs-on: ubuntu-latest | ||
# Map a step output to a job output | ||
outputs: | ||
should-skip-job: ${{steps.skip-check.outputs.should_skip}} | ||
steps: | ||
- id: skip-check | ||
uses: fkirc/[email protected] | ||
with: | ||
github_token: ${{github.token}} | ||
|
||
ci: | ||
needs: should-skip | ||
if: ${{needs.should-skip.outputs.should-skip-job != 'true' || github.ref == 'refs/heads/main'}} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest] | ||
test-type: ['unit', 'coverage'] | ||
env: | ||
BROWSER_STACK_USERNAME: ${{secrets.BROWSER_STACK_USERNAME}} | ||
BROWSER_STACK_ACCESS_KEY: ${{secrets.BROWSER_STACK_ACCESS_KEY}} | ||
CI_TEST_TYPE: ${{matrix.test-type}} | ||
runs-on: ${{matrix.os}} | ||
steps: | ||
- name: checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: read node version from .nvmrc | ||
run: echo ::set-output name=NVMRC::$(cat .nvmrc) | ||
shell: bash | ||
id: nvm | ||
|
||
- name: update apt cache on linux w/o browserstack | ||
run: sudo apt-get update | ||
|
||
- name: install ffmpeg/pulseaudio for firefox on linux w/o browserstack | ||
run: sudo apt-get install ffmpeg pulseaudio | ||
|
||
- name: start pulseaudio for firefox on linux w/o browserstack | ||
run: pulseaudio -D | ||
|
||
- name: setup node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '${{steps.nvm.outputs.NVMRC}}' | ||
cache: npm | ||
|
||
# turn off the default setup-node problem watchers... | ||
- run: echo "::remove-matcher owner=eslint-compact::" | ||
- run: echo "::remove-matcher owner=eslint-stylish::" | ||
- run: echo "::remove-matcher owner=tsc::" | ||
|
||
- name: npm install | ||
run: npm i --prefer-offline --no-audit | ||
|
||
- name: run npm test | ||
uses: GabrielBB/xvfb-action@v1 | ||
with: | ||
run: npm run test | ||
|
||
- name: coverage | ||
uses: codecov/codecov-action@v1 | ||
with: | ||
token: ${{secrets.CODECOV_TOKEN}} | ||
files: './test/dist/coverage/coverage-final.json' | ||
fail_ci_if_error: true | ||
if: ${{startsWith(env.CI_TEST_TYPE, 'coverage')}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,6 +27,8 @@ node_modules/ | |
|
||
# Build-related directories | ||
dist/ | ||
es/ | ||
cjs/ | ||
docs/api/ | ||
test/dist/ | ||
.eslintcache | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
lts/* | ||
14 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.