Skip to content

Commit

Permalink
Test build with CircleCI v2.0 (#109)
Browse files Browse the repository at this point in the history
  • Loading branch information
NZSmartie authored and ddollar committed Feb 17, 2018
1 parent b418051 commit 04887c4
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 10 deletions.
61 changes: 61 additions & 0 deletions .circleci/config.yml
@@ -0,0 +1,61 @@
# Golang CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-go/ for more details
version: 2
jobs:
build:
docker:
# specify the version
- image: circleci/golang:1.9

working_directory: /go/src/github.com/nzsmartie/forego

environment:
TEST_RESULTS: /tmp/test-results

steps:
- checkout
- run: go get github.com/daviddengcn/go-colortext
- run: go get github.com/subosito/gotenv

# For capturing test results
- run: go get github.com/jstemmer/go-junit-report
- run: mkdir -p $TEST_RESULTS

# specify any bash command here prefixed with `run: `
- run:
name: Run unit tests
command: |
trap "go-junit-report <${TEST_RESULTS}/forego-tests.log > ${TEST_RESULTS}/forego-tests-report.xml" EXIT
make test | tee ${TEST_RESULTS}/forego-tests.log
- store_artifacts:
path: /tmp/test-results
destination: raw-test-output

- store_test_results:
path: /tmp/test-results
release:
docker:
- image: circleci/golang:1.9

working_directory: /go/src/github.com/nzsmartie/forego

steps:
- checkout
- run: go get github.com/daviddengcn/go-colortext
- run: go get github.com/subosito/gotenv

- run: make release

workflows:
version: 2
deployment:
jobs:
- build
- release:
requires:
- build
filters:
branches:
only: master
2 changes: 1 addition & 1 deletion Makefile
@@ -1,5 +1,5 @@
BIN = forego
SRC = $(shell ls *.go)
SRC = $(shell find . -name '*.go' -not -path './vendor/*')

.PHONY: all build clean lint release test

Expand Down
9 changes: 0 additions & 9 deletions circle.yml

This file was deleted.

0 comments on commit 04887c4

Please sign in to comment.