language: node_js
dist: xenial
node_js:
  - 10

before_script:
    - curl -L "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/shunit2/shunit2-2.1.6.tgz" | tar zx
install:
  npm install gamedig
addons:
  apt:
    packages:
    - mailutils
    - postfix
    - curl
    - wget
    - file
    - bzip2
    - gzip
    - unzip
    - bsdmainutils
    - python
    - util-linux
    - ca-certificates
    - binutils
    - bc
    - jq
    - tmux
    - lib32gcc1
    - libstdc++6
    - libstdc++6:i386
    - net-tools
    - iproute2
    - shellcheck

jobs:
  include:
    - stage: jobs
      script: bash tests/tests_jc2server.sh
    - # stage name not required
      script: bash tests/tests_fctrserver.sh
    - # stage name not required
      script: bash tests/tests_mcserver.sh
    - # stage name not required
      script: bash tests/tests_ts3server.sh
    - # retired as codacy does this check.
      # script: bash tests/tests_shellcheck.sh