Skip to content
Snippets Groups Projects
Commit d77e0fe2 authored by Tom Wilkie's avatar Tom Wilkie
Browse files

Add unit tests to CI.

parent 44cd1a78
No related branches found
No related tags found
No related merge requests found
version: 2
workflows:
version: 2
test-build-deploy:
jobs:
- test
- build
- deploy:
requires:
- build
- test
jobs:
test:
docker:
- image: gcr.io/metrictank-gcr/logish-build-image:master-017c0b4
auth:
username: _json_key
password: $GCR_CREDS
working_directory: /go/src/github.com/grafana/logish
steps:
- checkout
- run:
name: Build Images
command: |
# skip building the build image again
touch build-image/.uptodate &&
make BUILD_IN_CONTAINER=false test
build:
docker:
- image: gcr.io/metrictank-gcr/logish-build-image:master-017c0b4
......@@ -28,6 +58,27 @@ jobs:
touch build-image/.uptodate &&
make BUILD_IN_CONTAINER=false
deploy:
docker:
- image: gcr.io/metrictank-gcr/logish-build-image:master-017c0b4
auth:
username: _json_key
password: $GCR_CREDS
working_directory: /go/src/github.com/grafana/logish
steps:
- checkout
- setup_remote_docker
- run:
name: Install Docker client
command: |
set -x
VER="17.03.0-ce"
curl -L -o /tmp/docker-$VER.tgz https://download.docker.com/linux/static/stable/x86_64/docker-$VER.tgz
tar -xz -C /tmp -f /tmp/docker-$VER.tgz
mv /tmp/docker/* /usr/bin
- run:
name: Push Images
command: |
......
......@@ -118,7 +118,7 @@ lint: build-image/$(UPTODATE)
./tools/lint -notestpackage -ignorespelling queriers -ignorespelling Queriers .
test: build-image/$(UPTODATE)
./tools/test -netgo
go test ./...
shell: build-image/$(UPTODATE)
bash
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment