-
Notifications
You must be signed in to change notification settings - Fork 9
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 #73 from operable/cm/travis
Add initial Travis CI configuration
- Loading branch information
Showing
1,700 changed files
with
360,667 additions
and
73 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
vendor/*/ | ||
*-test | ||
*.test | ||
**/*.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,16 @@ | ||
sudo: required | ||
|
||
services: | ||
- docker | ||
|
||
before_install: | ||
- docker build -t operable/go-relay-testing -f Dockerfile.ci . | ||
|
||
# Need the job ID in order to upload the Coveralls data | ||
script: | ||
- docker run -it --rm --env="TRAVIS_JOB_ID=${TRAVIS_JOB_ID}" operable/go-relay-testing make ci-coveralls | ||
- scripts/smoke_test.sh | ||
|
||
notifications: | ||
slack: | ||
secure: d0xJV5ZZ6wUqeQiUuMbM+6Goeejv38HpqK3UybzIEf8B7tjc7eljWZTU/+qYlqjzCzd5Kxwd+I3da5rP0oMeCuuWdjFWMTrrYOf2uGx9uVJ5D5dgNBvTWGQqE1KWWkoEEHAFChR/tw6KVqj5WG+yAEBJp0kVw2JiNdfo0X1YoaEvJcnJU1iqf3TtHHNk/XPQrwz2WSN9zNtzYKYrpnBEy+uK86SmgpUH7iggx8ZqwpKHknO6uPffD7PyPQq/zFEeWenbmeSSd9mT0F3rp6m8Zd0xnfRM3To0buu+isx1TBMECTli67G7kQlTDbmb6nL6F6yq1u/Vl1uJa8bm53wfwfKM25CMwTOkxyzgHFuKzaSiuyjfLESoz6wKmoQYFsMAoH4ZOmopsoQkJ49h472HMEa0iMkobJD01Mpjr5AhU1lazo8Fafz3BKoACH8GLIDrcHQmD0uC2plXsSWZAroy6DK0V8xkw27W7lnOi0Xq/yS5Ike2hqw+KBnLdwNUO8Nr2HmtkShXql+ovdIwxAA0JGj/h4DDkntoofAMIAeH3MHGa/6NoBlC+FXfpgFLM9vcStU9dFxFYufOcIlkIaZoBGVKOXPAgPaq6039XShGsXSQv+szFXiYi0H3fX3vSBaGOIhcw98EzUWH8LtByvMyiYCRUntZm/Xjnz8uGbS9b/Q= |
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,4 +1,8 @@ | ||
FROM operable/go:1.6.3 | ||
|
||
ENV PATH=${GOPATH}/bin:${PATH} | ||
# Add goveralls for sending stats to coveralls.io in Travis CI | ||
RUN go get github.com/mattn/goveralls | ||
|
||
COPY . $GOPATH/src/github.com/operable/go-relay | ||
WORKDIR $GOPATH/src/github.com/operable/go-relay |
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,5 +1,9 @@ | ||
# Relay | ||
|
||
[![Build Status](https://travis-ci.org/operable/go-relay.svg?branch=master)](https://travis-ci.org/operable/go-relay) | ||
[![Coverage Status](https://coveralls.io/repos/github/operable/go-relay/badge.svg?branch=master)](https://coveralls.io/github/operable/go-relay?branch=master) | ||
[![Ebert](https://ebertapp.io/github/operable/go-relay.svg)](https://ebertapp.io/github/operable/go-relay) | ||
|
||
## Dependencies | ||
|
||
* Go v1.6+ | ||
|
@@ -14,13 +18,19 @@ | |
git clone [email protected]:operable/go-relay.git $GOPATH/src/github.com/operable | ||
``` | ||
|
||
2. Download deps and compile an executable | ||
2. Install preqrequisites | ||
|
||
```sh | ||
go get -u github.com/kardianos/govendor | ||
``` | ||
|
||
3. Download deps and compile an executable | ||
|
||
``` | ||
make | ||
``` | ||
|
||
3. Set environment variables and run `relay`. | ||
4. Set environment variables and run `relay`. | ||
|
||
You'll need to have a docker machine running and have environment variables | ||
set for the docker client to connect to it. If you haven't already, run the | ||
|
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,51 @@ | ||
#!/bin/bash | ||
|
||
# Build a statically-linked Linux executable and then ensure that it | ||
# can run on the specified platform. | ||
# | ||
# (We're specifically asserting here that the Relay executable can run | ||
# on both glibc-based (e.g. Ubuntu) and musl-based (e.g. Alpine) | ||
# Linuxes.) | ||
# | ||
# Intended for running in Travis CI. | ||
|
||
# ENVIRONMENT VARIABLES: | ||
######################################################################## | ||
# | ||
# * TRAVIS_BUILD_ID | ||
# * TRAVIS_COMMIT | ||
|
||
set -euo pipefail | ||
|
||
######################################################################## | ||
# Build the executable inside a Docker image and then extract that | ||
# executable. | ||
|
||
image="operable/relay:builder-${TRAVIS_BUILD_ID}-${TRAVIS_COMMIT}" | ||
echo "--- Building ${image}" | ||
docker build -t "$image" -f Dockerfile.builder . | ||
|
||
executable_name="relay-${TRAVIS_BUILD_ID}-${TRAVIS_COMMIT}" | ||
echo "--- Extracting executable as ${executable_name}" | ||
container_id=$(docker create --entrypoint sh "$image") | ||
docker cp "${container_id}:/usr/local/bin/relay" "${executable_name}" | ||
docker rm "${container_id}" | ||
|
||
######################################################################## | ||
# Run a minimal smoke test on the executable: try to find out the | ||
# version of relay. We're just verifying that the executable can even | ||
# run on this platform. | ||
|
||
chmod a+x "${executable_name}" | ||
|
||
for PLATFORM in alpine:3.4 ubuntu:16.10 | ||
do | ||
echo "--- Running ${executable_name} on ${PLATFORM}" | ||
set -x | ||
docker run \ | ||
-it \ | ||
--rm \ | ||
-v "$(pwd):/testing" \ | ||
"${PLATFORM}" "/testing/${executable_name}" --version | ||
set +x | ||
done |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.