Skip to content

Commit

Permalink
feat(release): added travis.yml to run continuous deployment with sem…
Browse files Browse the repository at this point in the history
…antic versioning
  • Loading branch information
Patrick Scott committed Jan 4, 2018
1 parent 677f191 commit a8938cb
Showing 1 changed file with 66 additions and 0 deletions.
66 changes: 66 additions & 0 deletions travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
language: node_js

env:
# You may want to update this to whatever the latest version is, or keep it
# the same as your local machines. However, I have only tested it with 1.8.0+.
# There should be a time in the future when this is not necessary - it is
# explained in more detail below.
DOCKER_COMPOSE_VERSION: 1.18.0

cache:
directories:
- ~/.npm

notifications:
email: false

node_js:
- '8'
- '6'
- '4'

before_install:
# update is required to update the repositories to see the new packages for
# Docker.
- sudo apt-get update

# Now we can install the newer docker-engine which is required for the newer
# docker-composer we will install next. The messy options are to force it to
# be non-interactive (normally it asks you a bunch of config questions).
- sudo apt-get install -o Dpkg::Options::="--force-confold" --force-yes -y docker-engine

# As of the writing of this script Travis has docker-compose v1.4.2, we need
# to update it to 1.8+. $DOCKER_COMPOSE_VERSION is provide from the `env`
# above.
- sudo rm /usr/local/bin/docker-compose
- curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
- chmod +x docker-compose
- sudo mv docker-compose /usr/local/bin

# Check that docker-compose is now running the latest version (or at least the
# one we specified). This is not to be confused with the version we printed
# before doing the update.
- docker-compose --version

- docker-compose pull

# You will want this for logging. If one of your containers does not build for
# whatever reason it's best to report that now before your tests start
# otherwise it can be really tricky to debug why tests are failing sometimes.
- docker ps


before_script:
- npm run lint
- npm prune

script:
- npm t
- make docker-test

after_success:
- npm run semantic-release

branches:
except:
- /^v\d+\.\d+\.\d+$/

0 comments on commit a8938cb

Please sign in to comment.