-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
48 lines (40 loc) · 1.11 KB
/
Taskfile.yml
File metadata and controls
48 lines (40 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
version: '3'
tasks:
build:
desc: Builds the API and generates a binary for the current OS
cmds:
- go build -mod=vendor .
run:
desc: Builds and runs the server locally
deps: [build]
sources:
- ./*.go
cmds:
- ./simple-auth
vendor:
desc: Updates the vendor directory
cmds:
- go mod tidy
- go mod vendor
test:
desc: Runs go test
cmds:
- go test -mod=vendor -v ./api
cover:
desc: Runs coverage and generates the needed artifacts
cmds:
- go test -mod=vendor -v -coverprofile=coverage.out ./api && gocover-cobertura < coverage.out > coverage.xml && go tool cover -html=coverage.out -o coverage.html
docker-build:
desc: Builds and tags the docker image
cmds:
- docker build -t "kevineaton/simple-auth:latest" .
docker-run:
desc: Runs the latest built docker image
deps: [docker-slim]
cmds:
- docker run "kevineaton/simple-auth:latest"
docker-push:
desc: Builds and tags the docker image then pushes it to the hub
deps: [docker-slim]
cmds:
- docker push "kevineaton/simple-auth:latest"