language: node_js
sudo: required
node_js:
  - "16"
  - "14"
  - "12"
matrix:
  include:
    - node_js: "14"
      env: TEST_GRAPHICSMAGICK=TRUE
    - node_js: "14"
      env: TEST_IMAGEMAGICK=TRUE
    - node_js: "14"
      env: TEST_IMAGEMAGICK=IMPLICIT
    - node_js: "14"
      env: TEST_IMAGEMAGICK=IMPLICIT_WITH_SET

before_install:
  - curl --location http://rawgit.com/twolfson/fix-travis-ci/master/lib/install.sh | bash -s

install:
  # Run our install script
  - test/install.sh

  # Output the im/gm version
  - if test -n "$TEST_IMAGEMAGICK"; then convert -version; else gm -version; fi

  # Install dependencies
  - npm install

script:
  - npm test

notifications:
  email:
    recipients:
      - todd@twolfson.com
    on_success: change
    on_failure: change
