Skip to content

Commit

Permalink
tests: better test ablity
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonocasey committed Feb 9, 2022
1 parent 750ea68 commit 0a182e7
Show file tree
Hide file tree
Showing 9 changed files with 9,621 additions and 159 deletions.
28 changes: 5 additions & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,32 +23,17 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node: [12, 14, 16]
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
if: ${{matrix.os == 'ubuntu-latest'}}

- name: install ffmpeg/pulseaudio for firefox on linux w/o browserstack
run: sudo apt-get install ffmpeg pulseaudio
if: ${{matrix.os == 'ubuntu-latest'}}

- name: start pulseaudio for firefox on linux w/o browserstack
run: pulseaudio -D
if: ${{matrix.os == 'ubuntu-latest'}}

- name: setup node
uses: actions/setup-node@v2
with:
node-version: '${{steps.nvm.outputs.NVMRC}}'
node-version: '${{matrix.node}}'
cache: npm

# turn off the default setup-node problem watchers...
Expand All @@ -60,14 +45,11 @@ jobs:
run: npm i --prefer-offline --no-audit

- name: run npm test
uses: GabrielBB/xvfb-action@v1
with:
run: npm run test
run: npm run test

- name: coverage
uses: codecov/codecov-action@v1
with:
token: ${{secrets.CODECOV_TOKEN}}
files: './test/dist/coverage/coverage-final.json'
files: './coverage/coverage-final.json'
fail_ci_if_error: true
if: ${{startsWith(env.CI_TEST_TYPE, 'coverage')}}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,5 @@ npm-debug.log*
# Dependency directories
node_modules/
.eslintcache
.nyc_output
coverage
Loading

0 comments on commit 0a182e7

Please sign in to comment.