language: python
sudo: false

branches:
  only:
    - master

env:
  - LUA="lua=5.1"

before_install:
  - wget https://raw.githubusercontent.com/creationix/nvm/v0.33.11/nvm.sh -O ~/.nvm/nvm.sh # Node.js
  - source ~/.nvm/nvm.sh
  - nvm install 10
  - node --version
  - pip install hererocks # Lua
  - hererocks lua_install -r^ --$LUA
  - export PATH=$PATH:$PWD/lua_install/bin

install:
  - luarocks install luafilesystem
  - luarocks install dkjson
  - npm install
  - pushd tests && npm install && npm install @rbxts/types && popd

script:
  - npm run tslint
  - npm run prettylint
  - npm run ci

after_success:
  - npm run coverage
