# Angular and Meteor - The perfect stack https://www.angular-meteor.com/
#
# Author: Georgy Berdyshev
#

sudo: required
services:
  - docker
env:
  - distribution: ubuntu
    version: bionic
before_install:
  - curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
  - sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
  - sudo apt-get update
  - sudo apt-get -y install docker-ce
  - docker --version
  - 'sudo docker pull ${distribution}:${version}'
  - 'sudo docker build --no-cache --rm --file=Dockerfile --tag=angular-meteor:latest .'
install:
  - "sudo docker run -v ${TRAVIS_BUILD_DIR}:/angular-meteor-sourcecode/ --detach --name=angular-meteor-container --user docker --workdir /angular-meteor-sourcecode angular-meteor:latest bash -c 'source $HOME/.nvm/nvm.sh; git clean -fXd; npm cache verify; npm install -g concurrently'"
before_script:
  - "sudo docker exec --user root --workdir /angular-meteor-sourcecode angular-meteor-container bash -c 'chown -R docker /angular-meteor-sourcecode'"
script:
  - "sudo docker exec --tty --user docker --workdir /angular-meteor-sourcecode angular-meteor-container bash -c 'source $HOME/.nvm/nvm.sh; run_tests.sh'"
# Angular and Meteor - The perfect stack https://www.angular-meteor.com/
#
# Author: Georgy Berdyshev
#

sudo: required
services:
  - docker
env:
  - distribution: ubuntu
    version: bionic
before_install:
  - curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
  - sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
  - sudo apt-get update
  - sudo apt-get -y install docker-ce
  - docker --version
  - 'sudo docker pull ${distribution}:${version}'
  - 'sudo docker build --no-cache --rm --file=Dockerfile --tag=angular-meteor:latest .'
install:
  - "sudo docker run --memory 2g --volume ${TRAVIS_BUILD_DIR}:/angular-meteor-sourcecode/ --detach --name=angular-meteor-container --user docker --workdir /angular-meteor-sourcecode angular-meteor:latest bash -c 'source $HOME/.nvm/nvm.sh; git clean -fXd; npm cache verify; npm install -g concurrently'"
before_script:
  - "sudo docker exec --user root --workdir /angular-meteor-sourcecode angular-meteor-container bash -c 'chown -R docker /angular-meteor-sourcecode'"
script:
  - "sudo docker stats --no-stream"
  - "sudo free -m"
  - "sudo docker exec --tty --user docker --workdir /angular-meteor-sourcecode angular-meteor-container bash -c 'source $HOME/.nvm/nvm.sh; /angular-meteor-sourcecode/run_tests.sh'"
Increase available docker container memory.
Increase available docker container memory.
