This repository has been archived by the owner on Jun 28, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 327
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #54 from gemnasium/dont-load-all-drivers-43
Don't load all drivers
- Loading branch information
Showing
19 changed files
with
185 additions
and
85 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,17 @@ | ||
language: go | ||
sudo: required | ||
|
||
go: | ||
- 1.3 | ||
- 1.4 | ||
- 1.5 | ||
- tip | ||
|
||
addons: | ||
postgresql: "9.3" | ||
|
||
services: | ||
- cassandra | ||
- docker | ||
|
||
before_script: | ||
- > | ||
/usr/local/cassandra/bin/cqlsh -e "CREATE KEYSPACE migratetest WITH REPLICATION = {'class': 'SimpleStrategy', 'replication_factor' : 1};" | ||
- psql -c 'create database migratetest;' -U postgres | ||
- mysql -e 'create database migratetest;' | ||
before_install: | ||
- 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 | ||
- sed -i -e 's/golang/golang:'"$TRAVIS_GO_VERSION"'/' docker-compose.yml | ||
|
||
script: go test -p 1 ./... | ||
script: make test |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
FROM scratch | ||
ADD migrate /migrate | ||
ENTRYPOINT ["/migrate"] |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
IMAGE=mattes/migrate | ||
DCR=docker-compose run --rm | ||
.PHONY: clean test build release docker-build docker-push run | ||
|
||
all: release | ||
|
||
clean: | ||
rm -f migrate | ||
|
||
test: | ||
$(DCR) go-test | ||
|
||
build: | ||
$(DCR) go-build | ||
|
||
release: test build docker-build docker-push | ||
|
||
docker-build: | ||
docker build --rm -t $(IMAGE) . | ||
|
||
docker-push: | ||
docker push $(IMAGE) |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
go: &go | ||
image: golang | ||
working_dir: /go/src/github.com/mattes/migrate | ||
volumes: | ||
- $GOPATH:/go | ||
go-test: | ||
<<: *go | ||
command: sh -c 'go get -t -v ./... && go test -v ./...' | ||
links: | ||
- postgres | ||
- mysql | ||
- cassandra | ||
go-build: | ||
<<: *go | ||
command: sh -c 'go get -v && go build -ldflags ''-s'' -o migrater' | ||
environment: | ||
CGO_ENABLED: 0 | ||
postgres: | ||
image: postgres | ||
mysql: | ||
image: mysql | ||
environment: | ||
MYSQL_DATABASE: migratetest | ||
MYSQL_ALLOW_EMPTY_PASSWORD: yes | ||
cassandra: | ||
image: cassandra |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
package bash | ||
|
||
import ( | ||
"testing" | ||
) | ||
import "testing" | ||
|
||
func TestMigrate(t *testing.T) { | ||
|
||
|
This file contains 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
This file contains 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
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.