18F/micropurchase

View on GitHub
.travis.yml

Summary

Maintainability
Test Coverage
language: generic

services:
  - docker

before_install:
  - cp .env.test .env
  - rm .ruby-version
  - sudo rm /usr/local/bin/docker-compose
  - curl -L https://github.com/docker/compose/releases/download/1.4.2/docker-compose-`uname -s`-`uname -m` > docker-compose
  - chmod +x docker-compose
  - sudo mv docker-compose /usr/local/bin

script:
  - docker-compose build
  - docker-compose up -d
  - docker-compose run web bundle exec rake

notifications:
  email: false

addons:
  code_climate:
    repo_token: 2ad0d3196c872832cf5d6b34c83bf21dbf0a30e2191ba036be003b01e417a6a1

after_script:
- "./bin/codeclimate-batch --groups 2"
- docker pull 18fgsa/pa11y-crawl-docker
- docker-compose up -d
- docker run -t --net="host" 18fgsa/pa11y-crawl-docker pa11y-crawl http://localhost:3000

before_deploy:
- export PATH=$HOME:$PATH
- travis_retry curl -L -o $HOME/cf.tgz "https://cli.run.pivotal.io/stable?release=linux64-binary&version=6.22.2"
- tar xzvf $HOME/cf.tgz -C $HOME
- cf install-plugin autopilot -f -r CF-Community
- docker-compose run web bundle exec rake git:dump_sha
deploy:
- provider: script
  script: "./bin/deploy.sh staging"
  skip_cleanup: true
  on:
    branch: develop
- provider: script
  script: "./bin/deploy.sh production"
  skip_cleanup: true
  on:
    branch: master