This repository has been archived by the owner on Jun 18, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Taskfile.yml
73 lines (62 loc) · 1.74 KB
/
Taskfile.yml
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
version: '3'
tasks:
default:
cmds:
- task: test-all
- task: build-all
build-all:
deps: [build-who, get-global-data]
build-who:
desc: Build chart from WHO COVID-19 global data.
cmds:
- go run .
get-global-data:
desc: Get CSV files; WHO COVID-19 global data and Tokyo patients data.
dir: report/
cmds:
- curl -L -sS "https://covid19.who.int/WHO-COVID-19-global-data.csv" -o WHO-COVID-19-global-data.csv
- cat WHO-COVID-19-global-data.csv | jvgrep Japan > WHO-COVID-19-japan-data.csv || exit 0
build-google-forecast:
desc: Build chart from Google forecast data.
dir: report/
cmds:
- go run report.go
build-matsue:
desc: Build infections map in Matsue.
dir: report/matsue/
cmds:
- go run infections.go ./matsue-infections.xlsx > infections.dot
- dot -Tpng -o ./infections.png infections.dot
test-all:
cmds:
- task: prepare
- task: test
- task: graph
prepare:
cmds:
- go mod tidy -v -go=1.20
test:
desc: Update modules, check vulns, test, and lint.
cmds:
- go mod verify
- depm list -j | nancy sleuth -n
- go test -shuffle on ./...
- docker run --rm -v $(pwd):/app -w /app golangci/golangci-lint:v1.51.2 golangci-lint run --enable gosec --timeout 3m0s ./...
sources:
- ./go.mod
- '**/*.go'
clean:
desc: Clean module and build cache, and remove go.sum file.
cmds:
- rm -f ./go.sum
- go clean -cache
- go clean -modcache
graph:
desc: Make grapth of dependency modules.
cmds:
- depm m --dot --dot-config dot-config.toml | dot -Tpng -o ./dependency.png
sources:
- ./go.mod
- '**/*.go'
generates:
- ./dependency.png