forked from nautilus/gateway
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_tasks.hcl
36 lines (31 loc) · 1015 Bytes
/
_tasks.hcl
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
task "install:cd" {
description = "Install the necessary dependencies to run in CI. does not run `install`"
command = <<EOF
go install github.com/mitchellh/gox@latest
EOF
}
task "install" {
description = "Install the dependencies to develop locally"
command = "go mod download all"
}
task "tests" {
description = "Run the tests"
command = "go test -race ./..."
}
task "tests:coverage" {
description = "Run the tests, generate a coverage report, and report it to coveralls"
pipeline = [
"go test -v -coverprofile=coverage.out -race ./...",
"cd ./cmd/gateway && go test -v -race ./...",
]
}
task "build" {
description = "Build executable in all supported architectures"
command = <<EOF
cd cmd/gateway && gox -os="linux darwin windows" -arch=amd64 -output="../../bin/gateway_{{.OS}}_{{.Arch}}" -verbose .
EOF
}
config {
// have to change the template delimiters to support gox
delimiters = ["{%", "%}"]
}