p5.js-web-editor/.travis.yml

60 lines
1.6 KiB
YAML
Raw Normal View History

sudo: required
2017-10-16 03:35:58 +00:00
language: node_js
node_js:
- "8.11.1"
2018-06-25 23:13:31 +00:00
python:
- "3.4"
- "pypy-5.3.1"
services:
- docker
before_install:
# eventually set up AWS stuff here
- docker-compose -f docker-compose-development.yml up -d
- docker ps -a
install: true
script:
# Run unit tests in the app container
- docker-compose exec -T app npm run test --verbose
after_success:
2018-06-25 23:13:31 +00:00
# only run this if on the master branch eventually, not while testing tho
# - sudo apt-get install -y python3.4
# - sudo apt-get install --upgrade -y python-pip
# - sudo apt-get install jq
# - sudo pip install --user virtualenv
# # Create a virtual environment for AWS CLI
# - virtualenv my_py3 --python=/usr/bin/python3.4
# - source my_py3/bin/activate
# - pip install --upgrade awscli
# - pip install --upgrade awsebcli
# # Set AWS information
# - aws configure set aws_access_key_id $AWS_ACCESS_KEY
# - aws configure set aws_secret_access_key $AWS_SECRET_KEY
# - aws configure set default.region $AWS_REGION
# - aws configure set metadata_service_timeout 1200
# - aws configure set metadata_service_num_attempts 3
# - aws configure list
2018-06-25 23:13:31 +00:00
# build images
- docker-compose stop
2018-06-20 18:29:13 +00:00
- docker-compose build --no-cache
- docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
- docker tag $APP_IMAGE_NAME $DOCKER_USERNAME/$DOCKER_REPOSITORY:$TRAVIS_BUILD_ID
- docker push $DOCKER_USERNAME/$DOCKER_REPOSITORY:$TRAVIS_BUILD_ID
2018-06-20 18:29:13 +00:00
env:
global:
- APP_IMAGE_NAME=p5jswebeditor_app
# deploy:
# provider: elasticbeanstalk
# access_key_id: $AWS_ACCESS_KEY
# secret_access_key:
# secure: $AWS_SECRET_KEY
# region: $AWS_REGION
# app: $AWS_EBS_APP
# env: $AWS_EBS_ENV
# bucket_name: "the-target-S3-bucket"