Last active
July 9, 2016 08:47
-
-
Save fabriziomoscon/d952b0ee2c7a8b699586e3b9d1c2fee2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
box: golang | |
services: | |
- id: mongo:latest | |
build: | |
steps: | |
- wercker/setup-go-workspace: | |
package-dir: bitbucket.org/numberhack/api | |
- script: | |
name: add mongodb-org 3.0 repositories | |
code: | | |
apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10 | |
echo "deb http://repo.mongodb.org/apt/debian wheezy/mongodb-org/3.0 main" | tee /etc/apt/sources.list.d/mongodb-org-3.0.list | |
apt-get update -y | |
- install-packages: | |
name: install mongoimport | |
packages: mongodb-org-tools | |
# Build the project | |
- script: | |
name: go build | |
code: | | |
go build ./cmd/phone | |
- script: | |
name: import fixtures | |
code: | | |
mongoimport -h $MONGO_PORT_27017_TCP_ADDR:$MONGO_PORT_27017_TCP_PORT -d test-numberhack -c accounts --file fixtures/accounts.json | |
# integration tests | |
- script: | |
name: go integration-test | |
code: | | |
./integration-test.sh | |
deploy: | |
steps: | |
- heroku-deploy: | |
key: $HEROKU_KEY | |
key-name: HEROKU_KEY_PAIR | |
user: $HEROKU_USER | |
app-name: $HEROKU_APP_NAME |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment