From 46c12826a4332459f6aa0deb41c05efbe17b9de8 Mon Sep 17 00:00:00 2001 From: Nick Schuch Date: Thu, 18 Jul 2019 13:27:39 +1000 Subject: [PATCH] Update CircleCI configuration --- .circleci/config.yml | 41 +++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 30838649..50466e38 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,26 +1,27 @@ version: 2 + +workflows: + version: 2 + test: + jobs: + - lint + - unit + jobs: - build: + lint: docker: - - image: circleci/golang:1.11 + - image: golang:1.12 working_directory: /go/src/github.com/previousnext/terraform-provider-k8s - environment: - TEST_RESULTS: /tmp/test-results steps: - checkout - - run: mkdir -p $TEST_RESULTS - - run: go get github.com/jstemmer/go-junit-report - - run: go get github.com/golang/lint/golint - - run: - name: Run linting - command: make lint - - run: - name: Run unit tests - command: | - trap "go-junit-report <${TEST_RESULTS}/go-test.out > ${TEST_RESULTS}/go-test-report.xml" EXIT - make test | tee ${TEST_RESULTS}/go-test.out - - store_artifacts: - path: /tmp/test-results - destination: raw-test-output - - store_test_results: - path: /tmp/test-results + - run: | + go get golang.org/x/lint/golint + make lint + + unit: + docker: + - image: golang:1.12 + working_directory: /go/src/github.com/previousnext/terraform-provider-k8s + steps: + - checkout + - run: make test