From d316427730a94d9158a66b7d9ce176c8f1a4cae4 Mon Sep 17 00:00:00 2001 From: PyYoshi Date: Fri, 1 Jun 2018 23:30:31 +0900 Subject: [PATCH] support travis ci --- .gitignore | 3 +++ .travis.yml | 17 +++++++++++++++++ README.md | 9 ++++++++- codeship-services.yml | 2 +- docker-compose.ci.yml | 17 +++++++++++++++++ ....encrypted => secret.env.codeship.encrypted | 0 secret.env.travisci.encrypted | Bin 0 -> 64 bytes test.sh | 1 - 8 files changed, 46 insertions(+), 3 deletions(-) create mode 100644 .travis.yml create mode 100644 docker-compose.ci.yml rename secret.env.encrypted => secret.env.codeship.encrypted (100%) create mode 100644 secret.env.travisci.encrypted 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 0000000000000000000000000000000000000000..1d667afd653a3e42ffc4e6253d7b00ecc0e3768f GIT binary patch literal 64 zcmV-G0Kfl$8a!cI+M74|t^AEV+QRv`aN6X`^2ja-(t;4&Cjg|rjtMiA#piD+cwOs4 W?4zTQ