os: osx
osx_image: xcode10.2
#dist: bionic
#os: linux
language: node_js
node_js:
  - '15'

cache:
  directories:
    - node_modules
    - "$HOME/.electron"
    - "$HOME/.cache"

addons:
  apt:
    packages:
      - libgnome-keyring-dev
      - icnsutils
      - xvfb

install:
  - npm install -g xvfb-maybe
  - npm install -g yarn
  - npm install

services:
  - xvfb

before_script:
  - export DISPLAY=':99.0'
  - Xvfb :99 -screen 0 1024x600x24 > /dev/null 2>&1 &
  - sleep 3 # give xvfb some time to start

script:
  - PROGRESS="--no-progress" npm run build:native
  - PROGRESS="--no-progress" npm run test
