This repository was archived by the owner on Dec 15, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 6 files changed +47
-24
lines changed Expand file tree Collapse file tree 6 files changed +47
-24
lines changed Original file line number Diff line number Diff line change
1
+ sudo : required
2
+
3
+ services :
4
+ - docker
5
+
6
+ addons :
7
+ apt :
8
+ packages :
9
+ - docker-ce
10
+
11
+ script :
12
+ - docker-compose run --rm tests
Original file line number Diff line number Diff line change 1
- FROM golang:1.8.3-alpine AS golang-build
1
+ FROM golang:1.9.2-alpine3.6 AS golang-build
2
2
RUN mkdir -p /go/src/github.com/AirHelp/zendesk-mock
3
3
WORKDIR /go/src/github.com/AirHelp/zendesk-mock
4
4
COPY . .
Original file line number Diff line number Diff line change
1
+ FROM golang:1.9.2-alpine3.6 AS golang-build
2
+ RUN mkdir -p /go/src/github.com/AirHelp/zendesk-mock
Original file line number Diff line number Diff line change 1
- TEST? =$$(go list ./... | grep -v '/vendor/' )
2
- GOFMT_FILES? =$$(find . -type f -name '*.go' | grep -v vendor )
3
-
4
1
build :
5
- CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o zendesk-mock .
6
-
7
- release : build
8
- docker build -t airhelp/zendesk-mock -f Dockerfile .
2
+ docker build -t airhelp/zendesk-mock .
9
3
10
- push : release
4
+ push : build
11
5
docker push airhelp/zendesk-mock
12
6
13
- fmt :
14
- @echo ' run Go autoformat'
15
- @gofmt -w $(GOFMT_FILES )
16
-
17
- # vet runs the Go source code static analysis tool `vet` to find
18
- # any common errors.
19
- vet :
20
- @echo ' run the code static analysis tool'
21
- @go tool vet -all $$(ls -d */ | grep -v vendor )
22
-
23
- test : fmt vet
24
- @echo ' run the unit tests'
25
- @go test -cover $(TEST )
7
+ tests :
8
+ docker-compose run --rm tests
26
9
27
10
dev :
28
11
go build
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ cd $GOPATH/src/github.com/AirHelp/zendesk-mock
9
9
10
10
## Build
11
11
``` bash
12
- make release
12
+ make build
13
13
```
14
14
15
15
## Run locally on docker
@@ -25,5 +25,5 @@ make push
25
25
## Execute tests
26
26
27
27
```
28
- make test
28
+ make tests
29
29
```
Original file line number Diff line number Diff line change
1
+ version : ' 3.1'
2
+ services :
3
+ tests :
4
+ build :
5
+ context : .
6
+ dockerfile : Dockerfile-test
7
+ command : go test ./...
8
+ volumes :
9
+ - ./:/go/src/github.com/AirHelp/zendesk-mock
10
+ depends_on :
11
+ - fmt
12
+ - vet
13
+ vet :
14
+ build :
15
+ context : .
16
+ dockerfile : Dockerfile-test
17
+ command : go vet -v ./...
18
+ volumes :
19
+ - .:/go/src/github.com/AirHelp/zendesk-mock
20
+ fmt :
21
+ build :
22
+ context : .
23
+ dockerfile : Dockerfile-test
24
+ command : gofmt ./...
25
+ volumes :
26
+ - .:/go/src/github.com/AirHelp/zendesk-mock
You can’t perform that action at this time.
0 commit comments