-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
99 lines (82 loc) · 2.39 KB
/
Taskfile.yml
File metadata and controls
99 lines (82 loc) · 2.39 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
version: "3"
tasks:
run-server:
desc: Start the Jot server
dir: server
vars:
COMMIT:
sh: git rev-parse --short HEAD
BUILD_TIME:
sh: date -u +%Y-%m-%dT%H:%M:%SZ
LDFLAGS: "-X 'github.com/hanzei/jot/server/internal/server.commit={{.COMMIT}}' -X 'github.com/hanzei/jot/server/internal/server.version=dev' -X 'github.com/hanzei/jot/server/internal/server.buildTime={{.BUILD_TIME}}'"
cmds:
- rm -f jot
- go build -buildvcs=false -ldflags "{{.LDFLAGS}}" -o jot .
- ./jot
run-webapp:
desc: Start webapp dev server with HMR
dir: webapp
cmd: npx vite
test:
desc: Run all tests
deps: [test-server, test-webapp, test-mobile, test-shared]
test-server:
desc: Run server tests
dir: server
cmd: go test -v ./...
test-webapp:
desc: Run webapp tests
dir: webapp
cmd: npm run test:run
coverage:
desc: Run server tests with coverage
dir: server
cmds:
- go test -v -coverprofile=coverage.out ./...
- go tool cover -html=coverage.out -o coverage.html
lint:
desc: Run linters
deps: [lint-server, lint-webapp, lint-mobile, lint-shared]
lint-server:
desc: Run server linting with golangci-lint
dir: server
cmd: golangci-lint run
lint-webapp:
desc: Run webapp linting
dir: webapp
cmd: npm run lint && npm run lint:ts
check-translations:
desc: Check that all locale translation files have the same keys as en.json
dir: webapp
cmd: npm run check-translations
test-e2e:
desc: Run end-to-end tests
dir: webapp
cmd: npm run test:e2e
test-mobile:
desc: Run mobile app tests
dir: mobile
cmd: npm test -- --ci
lint-mobile:
desc: Run mobile app linting
dir: mobile
cmd: npm run lint && npm run typecheck
gen-docs:
desc: Regenerate Swagger API docs
dir: server
cmd: go tool swag init --generalInfo main.go --output docs --parseDependency --parseInternal
test-shared:
desc: Run shared package tests
dir: shared
cmd: npm run test:run
lint-shared:
desc: Run shared package linting
dir: shared
cmd: npm run lint && npm run typecheck
clean:
desc: Remove generated files and node packages
cmds:
- rm -rf webapp/build webapp/node_modules
- rm -rf mobile/node_modules
- rm -rf shared/node_modules
- rm -f server/jot server/coverage.out server/coverage.html