Chart.js/.github/workflows/ci.yml
Evert Timberg ff354cc5b8
Remove release branch workflow (#7827)
* GitHub actions uses locked install for CI
* Add initial GitHub action to publish to NPM
* Detect the NPM tag (latest vs next) depending on the git tag
* Deploy docs from releases & master commits
* Remove Travis CI
* Update repo badge to use actions status
* Remove Travis env vars and update docs-config to take a parameter
* Update publish script regex to match other scripts
* Deploy docs action only runs in one spot
2020-10-13 17:12:19 -04:00

56 lines
1.1 KiB
YAML

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:
- 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: Publish Test Results
run: cat ./coverage/lcov.info | ./node_modules/.bin/coveralls
shell: bash
continue-on-error: true