os: osx

language: node_js

node_js:
  - "node"

before_install:
  - brew update
  - brew cask install sketch # install Sketch
  - mkdir -p "~/Library/Application Support/com.bohemiancoding.sketch3/Plugins" # create plugins folder
  - echo $SKETCH_LICENSE > "~/Library/Application Support/com.bohemiancoding.sketch3/.deployment" # add the Sketch license

cache:
  directories:
    - "node_modules"
    - $HOME/Library/Caches/Homebrew

script:
  - npm run test -- --app=/Applications/Sketch.app

after_script:
  - rm "~/Library/App Support/com.bohemiancoding.sketch3/.deployment" # remove the Sketch license
