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

Add a test runner and travis config #36

Merged
merged 3 commits into from
Jul 21, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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