-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtaskfile.yaml
More file actions
84 lines (75 loc) · 2.16 KB
/
taskfile.yaml
File metadata and controls
84 lines (75 loc) · 2.16 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
version: '3'
includes:
db:
taskfile: ./db/taskfile.yaml
dir: ./db
app:
taskfile: ./app/taskfile.yaml
dir: ./app
vars:
# process supervisor
PSV: shell # shell, docker
tasks:
sources:
aliases: [src]
preconditions:
- sh: '[ "$(gofmt -s -l . | wc -l)" -eq 0 ]'
deps:
- task: linter:vet
- task: linter:critic
- task: linter:revive
- task: linter:errcheck
- task: linter:consistent
- task: linter:staticcheck
cmds:
- cmd: echo success
silent: true
process:
aliases: [proc]
desc: Run specified process in foreground
cmds:
- task: app:process
container:
aliases: [cnt]
desc: Start specified container in background
cmds:
- cmd: container started
processes:
aliases: [procs]
desc: Run and interrupt all processes
cmds:
- task: app:process
binaries:
aliases: [bins]
desc: Build all binaries if checks passed
deps:
- task: tests:unit
cmds:
- task: app:binary
tests:*:
desc: Run tests of specified level (unit, it, e2e).
vars:
LEVEL: '{{index .MATCH 0}}'
cmds:
- cmd: go test -tags=unit ./lib/... ./adt/... ./app/...
if: '{{eq .LEVEL "unit"}}'
- cmd: go test -run=TestIntegration ./lib/... ./adt/... ./app/...
if: '{{eq .LEVEL "it"}}'
- cmd: go test ./test/...
if: '{{eq .LEVEL "e2e"}}'
linter:*:
vars:
TOOL: '{{index .MATCH 0}}'
cmds:
- cmd: go vet ./lib/... ./adt/... ./app/...
if: '{{eq .TOOL "vet"}}'
- cmd: go run github.com/mgechev/revive -formatter unix -exclude ./proto/... ./...
if: '{{eq .TOOL "revive"}}'
- cmd: go run github.com/go-critic/go-critic/cmd/go-critic check ./lib/... ./adt/... ./app/...
if: '{{eq .TOOL "critic"}}'
- cmd: go run github.com/quasilyte/go-consistent ./lib/... ./adt/... ./app/...
if: '{{eq .TOOL "consistent"}}'
- cmd: go run honnef.co/go/tools/cmd/staticcheck ./lib/... ./adt/... ./app/...
if: '{{eq .TOOL "staticcheck"}}'
- cmd: go run github.com/kisielk/errcheck ./lib/... ./adt/... ./app/...
if: '{{eq .TOOL "errcheck"}}'