Skip to content

Commit 5c2c7a8

Browse files
authored
Merge pull request #4 from friendsofgo/config_circle_ci
Add circleci configuration
2 parents 65a1b5d + 953d0db commit 5c2c7a8

File tree

3 files changed

+27
-1
lines changed

3 files changed

+27
-1
lines changed

.circleci/config.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
version: 2
2+
jobs:
3+
build-go1.11.4:
4+
docker:
5+
- image: circleci/golang:1.11.4
6+
working_directory: /go/src/github.com/{{ORG_NAME}}/{{REPO_NAME}}
7+
steps:
8+
- checkout
9+
- run: go test -v -race ./...
10+
- run: go build -race cmd/gopherapi/main.go
11+
build-go_latest:
12+
docker:
13+
- image: circleci/golang:latest
14+
working_directory: /go/src/github.com/{{ORG_NAME}}/{{REPO_NAME}}
15+
steps:
16+
- checkout
17+
- run: go test -v -race ./...
18+
- run: go build -race cmd/gopherapi/main.go
19+
workflows:
20+
version: 2
21+
build_and_test:
22+
jobs:
23+
- build-go1.11.4
24+
- build-go_latest

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
[![CircleCI](https://circleci.com/gh/friendsofgo/gopherapi.svg?style=svg)](https://circleci.com/gh/friendsofgo/gopherapi)
2+
13
# Gopher API
24
The Gopher API, is a simple CRUD API for formative purpose, we're building it while writing the posts of the [blog](https://blog.friendsofgo.tech).
35

pkg/server/api_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ func TestFetchGophers(t *testing.T) {
4545
expected := len(sample.Gophers)
4646

4747
if len(got) != expected {
48-
t.Errorf("expected %d gophers, got: %d gopher", sample.Gophers, got)
48+
t.Errorf("expected %v gophers, got: %v gopher", sample.Gophers, got)
4949
}
5050
}
5151

0 commit comments

Comments
 (0)