2019-11-06 13:14:09 +01:00
|
|
|
name: CI
|
|
|
|
|
2019-12-03 23:52:39 +01:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
- "2.9"
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
- "2.9"
|
2019-11-06 13:14:09 +01:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2019-12-03 23:52:39 +01:00
|
|
|
os: [ubuntu-latest, windows-latest]
|
2019-11-06 13:14:09 +01:00
|
|
|
fail-fast: false
|
|
|
|
|
|
|
|
steps:
|
2020-02-27 18:28:11 +01:00
|
|
|
- uses: actions/checkout@v2
|
2019-11-06 13:14:09 +01:00
|
|
|
- name: Use Node.js
|
|
|
|
uses: actions/setup-node@v1
|
|
|
|
- name: Setup xvfb
|
|
|
|
run: |
|
|
|
|
Xvfb :99 -screen 0 1024x768x24 &
|
|
|
|
echo "::set-env name=DISPLAY:::99.0"
|
|
|
|
if: runner.os == 'Linux'
|
|
|
|
- name: Install chrome
|
|
|
|
run: |
|
|
|
|
brew update
|
|
|
|
brew cask install google-chrome
|
|
|
|
if: runner.os == 'macOS'
|
|
|
|
- name: Select browsers
|
|
|
|
run: |
|
|
|
|
if [ "${{ runner.os }}" == "macOS" ]; then
|
|
|
|
echo "::set-env name=BROWSERS::--browsers chrome"
|
|
|
|
fi
|
|
|
|
shell: bash
|
|
|
|
- name: Build and Test
|
|
|
|
run: |
|
2020-10-13 23:12:19 +02:00
|
|
|
npm ci
|
2020-05-27 23:14:17 +02:00
|
|
|
npm run build
|
|
|
|
npm test
|
2019-11-06 13:14:09 +01:00
|
|
|
- name: Package
|
|
|
|
run: |
|
2020-05-05 21:19:57 +02:00
|
|
|
npm run docs
|
|
|
|
npm run typedoc
|
2020-05-27 23:14:17 +02:00
|
|
|
npm pack
|
2020-11-10 18:59:11 +01:00
|
|
|
- name: Coveralls Parallel - Chrome
|
2020-11-10 16:21:38 +01:00
|
|
|
uses: coverallsapp/github-action@master
|
|
|
|
with:
|
|
|
|
github-token: ${{ secrets.github_token }}
|
2020-11-10 18:59:11 +01:00
|
|
|
path-to-lcov: './coverage/chrome/lcov.info'
|
|
|
|
flag-name: ${{ matrix.os }}-chrome
|
|
|
|
parallel: true
|
|
|
|
- name: Coveralls Parallel - Firefox
|
|
|
|
uses: coverallsapp/github-action@master
|
|
|
|
with:
|
|
|
|
github-token: ${{ secrets.github_token }}
|
|
|
|
path-to-lcov: './coverage/firefox/lcov.info'
|
|
|
|
flag-name: ${{ matrix.os }}-firefox
|
2020-11-10 16:21:38 +01:00
|
|
|
parallel: true
|
|
|
|
|
|
|
|
|
|
|
|
finish:
|
|
|
|
needs: build
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Coveralls Finished
|
|
|
|
uses: coverallsapp/github-action@master
|
|
|
|
with:
|
|
|
|
github-token: ${{ secrets.github_token }}
|
|
|
|
parallel-finished: true
|