-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathTaskfile.yml
More file actions
59 lines (52 loc) · 1.46 KB
/
Taskfile.yml
File metadata and controls
59 lines (52 loc) · 1.46 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
version: "3"
tasks:
lint:
desc: Run "golangci-lint" in all packages
cmds:
- cmd: dagger call lint --root=.
local-lint:
desc: Run "golangci-lint" in all packages with the go.work
cmds:
- |
for i in $(find . -name 'go.mod'); do
if [[ "$i" == "./.github/go.mod" ]]; then
continue
fi
pushd ${i:0:-6} 1>/dev/null
echo $i
golangci-lint run || true
popd 1>/dev/null
done
local-test:
desc: Run "go test ./..." in all packages with the go.work
cmds:
- |
for i in $(find . -name 'go.mod'); do
if [[ "$i" == "./.github/go.mod" ]]; then
continue
fi
pushd ${i:0:-6} 1>/dev/null
echo $i
OUT=$(go test ./... -v -race -cover 2>&1)
if [[ $? -ne 0 ]]; then
echo $OUT
exit 1
fi
popd 1>/dev/null
done
mod-tidy:
desc: Run "go mod tidy" in all packages
cmds:
- cmd: dagger call tidy --root=. source export --path=.
mod-update:
desc: Run "go get -u -t ./..." in all packages
cmds:
- cmd: dagger call update --root=. source export --path=.
test:
desc: Run "go test ./..." in all packages
cmds:
- cmd: dagger call test --root=.
deps:
desc: Update dependencies on all changed packages to the latest git commit
cmds:
- cmd: GOSUMDB=off GOPROXY="direct" ./scripts/deps.sh main all