Chart.js/.github/workflows/ci.yml
Edward Thomson aff7d41140 Add cross-platform CI (#6670)
* Linux and Windows CI with GitHub Actions
* Add karma-edge-launcher
* Add edge configuration to karma.conf.js
* Support --browsers on the command line for karma tests
* Add macOS CI builds
* Add karma-safari-private-launcher
* Document browser specification for tests
2019-11-06 07:14:09 -05:00

50 lines
1.2 KiB
YAML

name: CI
on: [push]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
fail-fast: false
steps:
- uses: actions/checkout@v1
- 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 gulp
run: npm install --global gulp
if: runner.os == 'macOS'
- 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 install
gulp build
gulp test --coverage ${BROWSERS}
- name: Package
run: |
gulp docs
gulp package
gulp bower
- name: Publish Test Results
run: cat ./coverage/lcov.info | ./node_modules/.bin/coveralls
continue-on-error: true