From 37bc8e178bd4b5c54bb0f20da5ab3482f20b4ff7 Mon Sep 17 00:00:00 2001 From: Adam Bozanich Date: Thu, 28 Jun 2018 18:09:13 -0700 Subject: [PATCH] ci: travis -> buildkite --- .buildkite/pipeline.yml | 32 ++++++++++++++++++++++- .buildkite/script/test.sh | 33 +++++++++++++++++++++--- .travis.yml | 54 --------------------------------------- README.md | 4 +-- 4 files changed, 62 insertions(+), 61 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 6dd032bd40..facf16d072 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -1,6 +1,6 @@ env: AKASH_GO_PACKAGE: "github.com/ovrclk/akash" - TEST_DELAY_THREAD_START: 10ms + TEST_DELAY_THREAD_START: 20ms steps: - name: ":ferris_wheel: tests" @@ -8,6 +8,8 @@ steps: golang#v2.0.0: version: "1.10" import: "${AKASH_GO_PACKAGE}" + environment: + - TEST_DELAY_THREAD_START command: .buildkite/script/test.sh test - name: ":popcorn: coverage" @@ -16,6 +18,7 @@ steps: version: "1.10" import: "${AKASH_GO_PACKAGE}" environment: + - TEST_DELAY_THREAD_START - CI - BUILDKITE - BUILDKITE_BRANCH @@ -33,3 +36,30 @@ steps: version: "1.10" import: "${AKASH_GO_PACKAGE}" command: .buildkite/script/test.sh integration + + - name: ":hospital: hygiene checks" + plugins: + golang#v2.0.0: + version: "1.10" + import: "${AKASH_GO_PACKAGE}" + command: .buildkite/script/test.sh lint + + - name: ":satellite: golang with rc" + branches: master + plugins: + golang#v2.0.0: + version: "rc" + import: "${AKASH_GO_PACKAGE}" + environment: + - TEST_DELAY_THREAD_START + command: .buildkite/script/test.sh test-lite + + - name: ":wilted_flower: golang with 1.9" + branches: master + plugins: + golang#v2.0.0: + version: "1.9" + import: "${AKASH_GO_PACKAGE}" + environment: + - TEST_DELAY_THREAD_START + command: .buildkite/script/test.sh test-lite diff --git a/.buildkite/script/test.sh b/.buildkite/script/test.sh index 2afb2fb642..39c9e06433 100755 --- a/.buildkite/script/test.sh +++ b/.buildkite/script/test.sh @@ -1,5 +1,7 @@ #!/bin/bash +set -euo pipefail + do_glide(){ echo "--- :building_construction: installing glide" curl https://glide.sh/get | sh @@ -14,13 +16,27 @@ do_bins(){ } do_vet(){ - echo "--- :mag: linting" + echo "--- :female-police-officer::skin-tone-4: vet" make test-vet } +do_lint(){ + echo "--- :building_construction: installing lint deps" + make lintdeps-install + + echo "--- :mag: linting" + make test-lint || { + echo "--- :rotating_light: excessive lint errors" + } +} + do_tests(){ echo "--- :female-scientist: runnig unit tests" - # make test-full + make test-full +} + +do_tests_lite(){ + echo "--- :female-scientist: runnig unit tests" make test } @@ -43,10 +59,13 @@ do_integration(){ case "$1" in test) do_glide - do_bins - do_vet do_tests ;; + test-lite) + do_glide + do_bins + do_tests_lite + ;; coverage) do_glide do_coverage @@ -55,4 +74,10 @@ case "$1" in do_glide do_integration ;; + lint) + do_glide + do_bins + do_vet + do_lint + ;; esac diff --git a/.travis.yml b/.travis.yml index ac6a1e77c2..981b8a67ff 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,51 +12,6 @@ env: jobs: include: - # linux/1.9: collect & submit test coverage - - name: test - os: linux - go: 1.9 - script: - - make build - - make test-vet - - make coverdeps-install - - make test-cover - - # linux/1.10 (mainline): tests, integration, image-bins - - name: test - os: linux - go: "1.10" - script: - - make build - - make test-vet - - make test - - make integrationdeps-install - - make test-integration - - make image-bins - - # linux/1.10 (mainline): print linting errors - - name: test-lint - os: linux - go: "1.10" - allow_failures: true - script: - - make lintdeps-install - - make test-lint - if: type = cron - - # linux/master: tests, integration, image-bins - - name: test - os: linux - go: master - script: - - make build - - make test-vet - - make test - - make integrationdeps-install - - make test-integration - - make image-bins - if: type = cron - # osx/1.10: tests, integration, image-bins - name: test os: osx @@ -71,15 +26,6 @@ jobs: - make image-bins if: type = cron - # linux/1.10 (mainline): build image - - name: image - os: linux - go: "1.10" - services: [docker] - script: - - make image - if: type = cron - # linux/1.10 (mainline): run skipped tests - name: test-skipped os: linux diff --git a/README.md b/README.md index 06fe3c5de3..7fc663bcc9 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ [![Akash](_docs/img/logo-label-black.svg "Akash")](#overview) -[![Build Status](https://travis-ci.org/ovrclk/akash.svg?branch=master)](https://travis-ci.org/ovrclk/akash) -[![Coverage Status](https://coveralls.io/repos/github/ovrclk/akash/badge.svg?branch=master)](https://coveralls.io/github/ovrclk/akash?branch=master) +[![Build status](https://badge.buildkite.com/85e140e3e8c0257c63d976946b061b805f0f338cdca7b02a9c.svg)](https://buildkite.com/ovrclk/akash) +[![Coverage](https://codecov.io/gh/ovrclk/akash/branch/master/graph/badge.svg)](https://codecov.io/gh/ovrclk/akash) [![Go Report Card](https://goreportcard.com/badge/github.com/ovrclk/akash)](https://goreportcard.com/report/github.com/ovrclk/akash) # Overview