diff --git a/.gitignore b/.gitignore index e7e91ab..0c48f3b 100644 --- a/.gitignore +++ b/.gitignore @@ -28,3 +28,6 @@ _testmain.go # Vendor vendor + +# coverage +/coverage.txt diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..0621fa2 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,17 @@ +--- +language: go + +go: + - tip + +services: + - docker + +before_install: + - openssl aes-256-cbc -K $encrypted_224d43ebbc15_key -iv $encrypted_224d43ebbc15_iv -in secret.env.travisci.encrypted -out secret.env -d + +script: + - docker-compose -f docker-compose.ci.yml up --build --abort-on-container-exit --exit-code-from sqlabble + +after_success: + - bash <(curl -s https://codecov.io/bash) diff --git a/README.md b/README.md index 0deb24e..3fcbe61 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,11 @@ -# sqlabble [![Codeship Status for sqlabble/sqlabble](https://img.shields.io/codeship/f3642650-d5ab-0134-3d76-0246ca48a45f/master.svg?style=flat)](https://app.codeship.com/projects/202522) [![Go Report Card](https://goreportcard.com/badge/github.com/sqlabble/sqlabble)](https://goreportcard.com/report/github.com/sqlabble/sqlabble) [![codecov](https://codecov.io/gh/sqlabble/sqlabble/branch/master/graph/badge.svg)](https://codecov.io/gh/sqlabble/sqlabble) [![GoDoc](https://img.shields.io/badge/godoc-reference-5272B4.svg?style=flat)](https://godoc.org/github.com/sqlabble/sqlabble) [![MIT License](http://img.shields.io/badge/license-MIT-blue.svg?style=flat)](LICENSE) +# sqlabble + +[![Codeship Status for sqlabble/sqlabble](https://img.shields.io/codeship/f3642650-d5ab-0134-3d76-0246ca48a45f/master.svg?style=flat)](https://app.codeship.com/projects/202522) +[![Build Status](https://travis-ci.org/sqlabble/sqlabble.svg?branch=master)](https://travis-ci.org/sqlabble/sqlabble) +[![Go Report Card](https://goreportcard.com/badge/github.com/sqlabble/sqlabble)](https://goreportcard.com/report/github.com/sqlabble/sqlabble) +[![codecov](https://codecov.io/gh/sqlabble/sqlabble/branch/master/graph/badge.svg)](https://codecov.io/gh/sqlabble/sqlabble) +[![GoDoc](https://img.shields.io/badge/godoc-reference-5272B4.svg?style=flat)](https://godoc.org/github.com/sqlabble/sqlabble) +[![MIT License](https://img.shields.io/badge/License-MIT-blue.svg?style=flat)](LICENSE) diff --git a/codeship-services.yml b/codeship-services.yml index 5cf299b..7f0dc55 100644 --- a/codeship-services.yml +++ b/codeship-services.yml @@ -6,7 +6,7 @@ services: build: . links: - mysql - encrypted_env_file: secret.env.encrypted + encrypted_env_file: secret.env.codeship.encrypted cached: true mysql: diff --git a/docker-compose.ci.yml b/docker-compose.ci.yml new file mode 100644 index 0000000..ea7e3df --- /dev/null +++ b/docker-compose.ci.yml @@ -0,0 +1,17 @@ +version: '2' + +services: + + sqlabble: + build: . + depends_on: + - mysql + env_file: secret.env + volumes: + - ./:/go/src/github.com/sqlabble/sqlabble + + mysql: + image: mysql:5.7 + environment: + MYSQL_ALLOW_EMPTY_PASSWORD: 'yes' + MYSQL_DATABASE: 'sqlabble' diff --git a/secret.env.encrypted b/secret.env.codeship.encrypted similarity index 100% rename from secret.env.encrypted rename to secret.env.codeship.encrypted diff --git a/secret.env.travisci.encrypted b/secret.env.travisci.encrypted new file mode 100644 index 0000000..1d667af Binary files /dev/null and b/secret.env.travisci.encrypted differ diff --git a/test.sh b/test.sh index 30c8e24..028cf41 100644 --- a/test.sh +++ b/test.sh @@ -14,4 +14,3 @@ if [ "$CI" = "true" ]; then curl -o upload.sh https://codecov.io/bash bash ./upload.sh fi -rm -rf coverage.txt