Skip to content

Commit

Permalink
ci: use buildkite
Browse files Browse the repository at this point in the history
 * run builds on our own AWS instances
 * use codecov.io for code coverage
 * travis-ci jobs still enabled for now
  • Loading branch information
boz committed Jun 29, 2018
1 parent dd5f759 commit 8ab4af8
Show file tree
Hide file tree
Showing 5 changed files with 106 additions and 2 deletions.
35 changes: 35 additions & 0 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
env:
AKASH_GO_PACKAGE: "github.com/ovrclk/akash"
TEST_DELAY_THREAD_START: 10ms
steps:

- name: ":ferris_wheel: tests"
plugins:
golang#v2.0.0:
version: "1.10"
import: "${AKASH_GO_PACKAGE}"
command: .buildkite/script/test.sh test

- name: ":popcorn: coverage"
plugins:
golang#v2.0.0:
version: "1.10"
import: "${AKASH_GO_PACKAGE}"
environment:
- CI
- BUILDKITE
- BUILDKITE_BRANCH
- BUILDKITE_BUILD_NUMBER
- BUILDKITE_JOB_ID
- BUILDKITE_BUILD_URL
- BUILDKITE_PROJECT_SLUG
- BUILDKITE_COMMIT
- CODECOV_TOKEN
command: .buildkite/script/test.sh coverage

- name: ":man-juggling: integration"
plugins:
golang#v2.0.0:
version: "1.10"
import: "${AKASH_GO_PACKAGE}"
command: .buildkite/script/test.sh integration
58 changes: 58 additions & 0 deletions .buildkite/script/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
#!/bin/bash

do_glide(){
echo "--- :building_construction: installing glide"
curl https://glide.sh/get | sh

echo "--- :inbox_tray: installing deps"
make deps-install
}

do_bins(){
echo "--- :hammer_and_pick: building binaries"
make bins
}

do_vet(){
echo "--- :mag: linting"
make test-vet
}

do_tests(){
echo "--- :female-scientist: runnig unit tests"
# make test-full
make test
}

do_coverage(){
echo "--- :female-scientist: capturing test coverage"
go test -coverprofile=coverage.txt -covermode=count -coverpkg="./..." ./...

echo "--- :satellite_antenna: uploading test coverage"
bash <(curl -s https://codecov.io/bash)
}

do_integration(){
echo "--- :building_construction: installing integration dependencies"
make integrationdeps-install

echo "--- :juggling: running integration tests"
make test-integration
}

case "$1" in
test)
do_glide
do_bins
do_vet
do_tests
;;
coverage)
do_glide
do_coverage
;;
integration)
do_glide
do_integration
;;
esac
6 changes: 6 additions & 0 deletions .buildkite/template.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
name: Akash Build
repository: https://github.com/ovrclk/akash.git
steps:
- name: ":pipeline:"
command: "buildkite-agent pipeline upload"
3 changes: 3 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ignore:
- **/*.pb.go
- **/mocks/.*
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ IMAGE_BINS := _build/akash _build/akashd

IMAGE_BUILD_ENV = GOOS=linux GOARCH=amd64

all: build $(BINS)
all: build bins

bins: $(BINS)

build:
go build -i $$(glide novendor)
Expand Down Expand Up @@ -120,7 +122,7 @@ docs:
clean:
rm -f $(BINS) $(IMAGE_BINS)

.PHONY: all build \
.PHONY: all bins build \
akash akashd \
image image-bins \
test test-nocache test-full \
Expand Down

0 comments on commit 8ab4af8

Please sign in to comment.