chore: update CI to run Travis + Linux + Chromium (#5583)

Our CI build has been incredibly flaky across all three of our current CIs:

* Appveyor: Chromium + Windows
* Travis: Firefox + Linux, Chromium + Linux
* Cirrus: Chromium + Linux, Chromium + Mac

Legitimate issues and errors have been missed because it's expected that the CI is red and therefore it's not seen as an issue when a PR's build fails.

We should have a build that covers the full combo of browsers and operating systems but it's more important to have a consistent, reliable green build where failures are genuine. So this commit strips our CI back to Chromium on Linux on Travis, and nothing more. Once this is stable we will expand out into more operating systems and bring back Firefox, too.
This commit is contained in:
Jack Franklin 2020-04-08 10:38:07 +01:00 committed by GitHub
parent 21c2d31523
commit 83d9d530ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 71 deletions

View File

@ -1,15 +0,0 @@
environment:
matrix:
- nodejs_version: "10.18.1"
build: off
install:
- ps: Install-Product node $env:nodejs_version
- npm install
- if "%nodejs_version%" == "10.18.1" (
npm run lint &&
npm run coverage &&
npm run test-doclint &&
npm run test-types
)

View File

@ -1,32 +0,0 @@
env:
DISPLAY: :99.0
task:
matrix:
- name: Chromium (node10 + linux)
container:
dockerfile: .ci/node10/Dockerfile.linux
- name: Chromium (node12 + linux)
container:
dockerfile: .ci/node12/Dockerfile.linux
xvfb_start_background_script: Xvfb :99 -ac -screen 0 1024x768x24
install_script: npm install --unsafe-perm
lint_script: npm run lint
coverage_script: npm run coverage
test_doclint_script: npm run test-doclint
test_types_script: npm run test-types
task:
osx_instance:
image: high-sierra-base
name: Chromium (node10 + macOS)
env:
HOMEBREW_NO_AUTO_UPDATE: 1
node_install_script:
- brew install node@10
- brew link --force node@10
install_script: npm install --unsafe-perm
lint_script: npm run lint
coverage_script: npm run coverage
test_doclint_script: npm run test-doclint
test_types_script: npm run test-types

View File

@ -1,4 +1,5 @@
language: node_js language: node_js
os: linux
dist: trusty dist: trusty
addons: addons:
apt: apt:
@ -10,31 +11,13 @@ notifications:
cache: cache:
directories: directories:
- node_modules - node_modules
# allow headful tests
before_install:
- "sysctl kernel.unprivileged_userns_clone=1"
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- 'if [ "$FIREFOX" = "true" ]; then pyenv shell 3.6; pip3 install --user mozdownload; fi'
- 'if [ "$FIREFOX" = "true" ]; then rm -rf $FIREFOX_HOME; mozdownload -t daily -d $FIREFOX_HOME/latest.tar.bz --log-level DEBUG; fi'
- 'if [ "$FIREFOX" = "true" ]; then cd $FIREFOX_HOME; tar -xvf latest.tar.bz; cd -; ls $FIREFOX_HOME/firefox/firefox; fi'
script:
- 'if [ "$CHROMIUM" = "true" ]; then npm run lint; fi'
- 'if [ "$CHROMIUM" = "true" ]; then npm run coverage; fi'
- 'if [ "$FIREFOX" = "true" ]; then BINARY=$FIREFOX_HOME/firefox/firefox npm run funit; fi'
- 'if [ "$CHROMIUM" = "true" ]; then npm run test-doclint; fi'
- 'if [ "$CHROMIUM" = "true" ]; then npm run test-types; fi'
- 'if [ "$CHROMIUM" = "true" ]; then npm run bundle; fi'
- 'if [ "$CHROMIUM" = "true" ]; then npm run unit-bundle; fi'
jobs: jobs:
include: include:
- node_js: "12.16.1" - node_js: "10.19.0"
dist: trusty
env: env:
- CHROMIUM=true - CHROMIUM=true
- node_js: "10.18.1" before_install:
env: - "export DISPLAY=:99.0"
- CHROMIUM=true - "sh -e /etc/init.d/xvfb start"
- node_js: "10.18.1" script: ./travis/chromium.sh
env:
- FIREFOX=true
- FIREFOX_HOME=$TRAVIS_HOME/firefox-latest

8
travis/chromium.sh Executable file
View File

@ -0,0 +1,8 @@
#!/usr/bin/env sh
npm run lint &&
npm run coverage &&
npm run test-doclint &&
npm run test-types &&
npm run bundle &&
npm run unit-bundle