-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathTaskfile.yaml
63 lines (53 loc) · 1.48 KB
/
Taskfile.yaml
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
version: "3"
dotenv: [".env"]
silent: true
vars:
# when updating this value, plese update
# the .github/workflows/build.yml
MINIO: RELEASE.2022-04-09T15-09-52Z
tasks:
bingo:
desc: "Install build dependencies"
cmds:
- make -s -f .bingo/Variables.mk
pre-test:
desc: "Run pre-test tasks, start a minio server"
status:
- test $(docker ps | grep miniotest | awk '{print $1}')
cmds:
- echo "Starting test minio server"
- docker run --rm -d --name miniotest -p 9000:9000 eu.gcr.io/contiamo-public/minio:{{.MINIO}}
post-test:
desc: "Run post-test cleanup, stop the minio test server"
cmds:
- echo "Stopping test minio server"
- docker kill miniotest
lint:
summery: "Run go lint tasks"
deps:
- bingo
cmds:
- $GOBIN/golangci-lint-v1.45.2 run ./...
test:
desc: "Run pre-test, the go test suite, and then post-test"
cmds:
- task: pre-test
- defer: { task: post-test }
- task: run-test
run-test:
cmds:
- go test -cover -covermode=atomic -v ./... {{.CLI_ARGS}}
run-example:
desc: run the example cli
cmds:
- go run ./example/main.go {{.CLI_ARGS}}
build-minio:
dir: contrib/docker
cmds:
- docker build -t eu.gcr.io/contiamo-public/minio:{{.MINIO}} .
sync-minio:
desc: sync the minio image to the Contiamo public registry
dir: contrib/docker
cmds:
- task: build-minio
- docker push eu.gcr.io/contiamo-public/minio:{{.MINIO}}