Skip to content
This repository has been archived by the owner on Aug 13, 2019. It is now read-only.

Commit

Permalink
Merge pull request #36 from stripe/asf-travis-ci
Browse files Browse the repository at this point in the history
Add a test runner and travis config
  • Loading branch information
antifuchs authored Jul 21, 2016
2 parents 6382edb + 29bf150 commit f9c42fd
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.1.5
2.1.9
19 changes: 19 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
sudo: required

language: ruby

services:
- docker

install:
- docker build -t stripeoss/gaps:latest .

script:
- docker run --rm stripeoss/gaps:latest ./bin/test-runner

after_success:
# Upload the latest master build to docker hub:
- if [ "$TRAVIS_PULL_REQUEST" == "false" -a "$TRAVIS_BRANCH" == "master" ]; then
docker login -e="$DOCKER_EMAIL" -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD";
docker push stripeoss/gaps:latest;
fi
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM phusion/passenger-ruby21
FROM phusion/passenger-ruby21:0.9.19
MAINTAINER Greg Brockman <[email protected]>
ENV PORT 3500
EXPOSE 3500
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ruby '2.1.7'
ruby '2.1.9'

# Execute bundler hook (analogous to sourcing a dotfile)
['~/.', '/etc/'].any? do |file|
Expand Down
26 changes: 26 additions & 0 deletions bin/test-runner
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash

cat >>site.yaml<<EOF
db:
database: gaps
mongodb_url: mongodb://localhost:27017
favicon: foo.ico
gaps_url: https://gaps.example.com
info:
domain: example.com
company_name: Example Company
notify:
send_email: false
to: [email protected]
from: [email protected]
oauth:
client_id: ""
client_secret: ""
redirect_uri: http://localhost:3500/oauth2callback
port: 3500
session:
secret: "reallyonlytesting"
secure: false
EOF

bundle exec rake test

0 comments on commit f9c42fd

Please sign in to comment.