--- language: node_js node_js: - 12 - 14 - 16 dist: xenial services: - xvfb before_install: - export DISPLAY=:99.0 - export PATH=$PATH:"$HOME/.esvu/bin" # - sh -e /etc/init.d/xvfb start env: # Shells # - ESHOST_TARGET=ch - ESHOST_TARGET=engine262 - ESHOST_TARGET=jsshell - ESHOST_TARGET=node - ESHOST_TARGET=qjs - ESHOST_TARGET=xs # # Browsers - ESHOST_TARGET=firefox - ESHOST_TARGET=chrome # - ESHOST_TARGET=remote ESHOST_REMOTE_BROWSERNAME=firefox install: | # Shells export ESHOST_SKIP_CH=1 export ESHOST_SKIP_D8=1 export ESHOST_SKIP_ENGINE262=1 export ESHOST_SKIP_GRAALJS=1 export ESHOST_SKIP_HERMES=1 export ESHOST_SKIP_JSC=1 export ESHOST_SKIP_JSSHELL=1 export ESHOST_SKIP_QJS=1 export ESHOST_SKIP_NODE=1 export ESHOST_SKIP_XS=1 # Browsers export ESHOST_SKIP_CHROME=1 export ESHOST_SKIP_FIREFOX=1 export ESHOST_SKIP_REMOTE=1 function install_firefox { export TMP=$(mktemp); wget https://archive.mozilla.org/pub/firefox/nightly/2021/05/2021-05-11-09-33-39-mozilla-central/firefox-90.0a1.en-US.linux-x86_64.tar.bz2 -O $TMP; tar -xvf $TMP; wget https://github.com/mozilla/geckodriver/releases/download/v0.29.1/geckodriver-v0.29.1-linux64.tar.gz -O $TMP; tar --directory firefox -xvf $TMP; rm $TMP; unset TMP; } if [[ "$ESHOST_TARGET" == "node" ]]; then unset ESHOST_SKIP_NODE; elif [[ "$ESHOST_TARGET" == "engine262" ]]; then unset ESHOST_SKIP_ENGINE262; elif [[ "$ESHOST_TARGET" == "qjs" ]]; then unset ESHOST_SKIP_QJS; elif [[ "$ESHOST_TARGET" == "graaljs" ]]; then unset ESHOST_SKIP_GRAALJS; elif [[ "$ESHOST_TARGET" == "jsshell" ]]; then unset ESHOST_SKIP_JSSHELL; elif [[ "$ESHOST_TARGET" == "hermes" ]]; then unset ESHOST_SKIP_HERMES; elif [[ "$ESHOST_TARGET" == "xs" ]]; then unset ESHOST_SKIP_XS; elif [[ "$ESHOST_TARGET" == "firefox" ]]; then install_firefox; export PATH=$(pwd)/firefox:$PATH; unset ESHOST_SKIP_FIREFOX; elif [[ "$ESHOST_TARGET" == "ch" ]]; then wget https://s3.amazonaws.com/eshost-builds/ChakraCore-Debug_linux_1_7_0.tar.gz; tar -xvf ChakraCore-Debug_linux_1_7_0.tar.gz; export PATH=$PATH:$(pwd)/out/Debug; unset ESHOST_SKIP_CH; elif [[ "$ESHOST_TARGET" == "chrome" ]]; then channel=unstable deb_archive=google-chrome-${channel}_current_amd64.deb wget https://dl.google.com/linux/direct/$deb_archive # If the environment provides an installation of Google Chrome, the # existing binary may take precedence over the one introduced in this # script. Remove any previously-existing "alternatives" prior to # installation in order to ensure that the new binary is installed as # intended. if sudo update-alternatives --list google-chrome; then sudo update-alternatives --remove-all google-chrome fi # Installation will fail in cases where the package has unmet dependencies. # When this occurs, attempt to use the system package manager to fetch the # required packages and retry. if ! sudo dpkg --install $deb_archive; then sudo apt-get install --fix-broken sudo dpkg --install $deb_archive fi mkdir chrome ln -s $(which google-chrome) chrome/chrome wget https://chromedriver.storage.googleapis.com/91.0.4472.19/chromedriver_linux64.zip unzip -d chrome chromedriver_linux64.zip PATH=$PATH:$(pwd)/chrome unset ESHOST_SKIP_CHROME; elif [[ "$ESHOST_TARGET" == "remote" ]]; then install_firefox; wget http://selenium-release.storage.googleapis.com/4.0/selenium-server-standalone-4.0.0-alpha-2.jar PATH=$PATH:$(pwd)/firefox java -jar selenium-server-standalone-4.0.0-alpha-2.jar &> selenium-server.log & unset ESHOST_SKIP_REMOTE; else exit 1; fi npm install --ignore-scripts; npm install esvu -g; esvu --engines=all; # esvu --engines=engine262,quickjs,spidermonkey,v8,xs; script: - npm run lint - npm run test after_script: | if [[ "$ESHOST_TARGET" == "remote" ]]; then cat selenium-server.log fi