Skip to content

Commit

Permalink
Update to CircleCI 2.0
Browse files Browse the repository at this point in the history
CircleCI 1.0 has been deprecated and is no longer supported.

This is basically a port of the existing circle.yml file, using the Circle Go language guide as a base (https://circleci.com/docs/2.0/language-go/)
  • Loading branch information
slai committed Jan 2, 2019

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 3e226f5 commit b852eb9
Showing 2 changed files with 41 additions and 9 deletions.
41 changes: 41 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
version: 2
jobs:
build:
docker:
- image: circleci/golang:1.11.4
working_directory: /go/src/github.com/citymapper/go-minipypi
environment:
TEST_RESULTS: &test_results /tmp/test-results
OUTPUT_BIN: &output_bin /tmp/bin

steps:
- checkout
- run: mkdir -p "$TEST_RESULTS"
- run: mkdir -p "$OUTPUT_BIN"

- run: go get github.com/jstemmer/go-junit-report

- run:
name: Run unit tests
command: |
trap "go-junit-report <${TEST_RESULTS}/go-test.out > ${TEST_RESULTS}/go-test-report.xml" EXIT
go test -v 2>&1 | tee ${TEST_RESULTS}/go-test.out
- run: go build

- run:
name: Create build artifact
command: |
gzip go-minipypi
mv -f go-minipypi.gz "$OUTPUT_BIN/go-minipypi-`uname -s`-`uname -m`.gz"
- store_artifacts:
path: *test_results
destination: raw-test-output

- store_test_results:
path: *test_results

- store_artifacts:
path: *output_bin
destination: bin
9 changes: 0 additions & 9 deletions circle.yml

This file was deleted.

0 comments on commit b852eb9

Please sign in to comment.