Chart.js/.github/workflows/ci.yml

77 lines
1.8 KiB
YAML
Raw Normal View History

name: CI
on:
push:
branches:
- master
- "2.9"
pull_request:
branches:
- master
- "2.9"
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
fail-fast: false
steps:
2020-02-27 18:28:11 +01:00
- uses: actions/checkout@v2
- 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: |
npm ci
npm run build
npm test
- name: Package
run: |
npm run docs
npm run typedoc
npm pack
- name: Coveralls Parallel - Chrome
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
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
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