Skip to content

Commit dde1f05

Browse files
authored
Merge pull request #39 from zencoder/circle_v2
CircleCI v2
2 parents 67a2211 + fd6da63 commit dde1f05

File tree

4 files changed

+59
-49
lines changed

4 files changed

+59
-49
lines changed

.circleci/config.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
version: 2
3+
executorType: docker
4+
containerInfo:
5+
- image: library/golang
6+
environment:
7+
AWS_ACCESS_KEY_ID: 1
8+
AWS_SECRET_ACCESS_KEY: 1
9+
GLIDE_VERSION: 0.12.3
10+
jobs:
11+
build:
12+
workdir: "/go/src/github.com/zencoder/go-dash"
13+
steps:
14+
- checkout
15+
- run:
16+
name: Install Glide
17+
command: |
18+
set -eux
19+
curl -sSLfO https://github.com/Masterminds/glide/releases/download/v${GLIDE_VERSION}/glide-v${GLIDE_VERSION}-linux-amd64.tar.gz
20+
mkdir glide
21+
tar -xzf glide-v${GLIDE_VERSION}-linux-amd64.tar.gz -C ./glide
22+
cp ./glide/linux-amd64/glide /usr/local/bin/glide
23+
rm -r glide glide-v${GLIDE_VERSION}-linux-amd64.tar.gz
24+
- restore_cache:
25+
key: glide-{{ checksum "glide.lock" }}
26+
- run:
27+
name: Download vendored Go dependencies
28+
command: glide install
29+
- save_cache:
30+
key: glide-{{ checksum "glide.lock" }}
31+
paths:
32+
- vendor
33+
- run:
34+
name: Install required tooling
35+
command: |
36+
go get golang.org/x/tools/cmd/cover
37+
go get github.com/mattn/goveralls
38+
go get github.com/modocache/gover
39+
- run:
40+
name: Run unit tests
41+
command: |
42+
make test
43+
- run:
44+
name: Collect coverage reports
45+
command: |
46+
make cover
47+
- run:
48+
name: Submit coverage to coveralls.io
49+
command: |
50+
make coveralls

Makefile

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,22 @@
1-
GO15VENDOREXPERIMENT := 1
21
COVERAGEDIR = coverage
32
ifdef CIRCLE_ARTIFACTS
43
COVERAGEDIR = $(CIRCLE_ARTIFACTS)
54
endif
65

6+
ifdef VERBOSE
7+
V = -v
8+
else
9+
.SILENT:
10+
endif
11+
712
all: test cover
813

914
fmt:
1015
find . -not -path "./vendor/*" -name '*.go' -type f | sed 's#\(.*\)/.*#\1#' | sort -u | xargs -n1 -I {} bash -c "cd {} && goimports -w *.go && gofmt -w -s -l *.go"
1116

1217
test:
13-
if [ ! -d coverage ]; then mkdir coverage; fi
14-
go test -v ./mpd -race -cover -coverprofile=$(COVERAGEDIR)/mpd.coverprofile
18+
mkdir -p coverage
19+
go test $(V) ./mpd -race -cover -coverprofile=$(COVERAGEDIR)/mpd.coverprofile
1520

1621
cover:
1722
go tool cover -html=$(COVERAGEDIR)/mpd.coverprofile -o $(COVERAGEDIR)/mpd.html

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ mkdir -p $GOPATH/src/github.com/zencoder
1313
cd $GOPATH/src/github.com/zencoder
1414
git clone https://github.com/zencoder/go-dash
1515
cd go-dash
16-
export GO15VENDOREXPERIMENT=1
1716
glide install
1817
go install ./...
1918
```
@@ -55,7 +54,7 @@ make examples-ondemand
5554

5655
### Dependencies
5756

58-
Tested on go 1.8.3.
57+
Tested on go 1.9.1.
5958

6059
### Build and run unit tests
6160

circle.yml

Lines changed: 0 additions & 44 deletions
This file was deleted.

0 commit comments

Comments
 (0)