forked from go-gormigrate/gormigrate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Taskfile.yml
79 lines (64 loc) · 1.72 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
74
75
76
77
78
79
# https://taskfile.dev
version: '3'
tasks:
lint:
desc: Run golangci-lint
cmds:
- golangci-lint run
- cd integration-test && golangci-lint run --path-prefix integration-test
test:
dir: ./integration-test
cmds:
- go test -v -tags {{.DATABASE}} ./...
test:mysql:
desc: Run tests for MySQL
cmds:
- task: test
vars: {DATABASE: mysql}
test:postgres:
desc: Run tests for PostgreSQL
cmds:
- task: test
vars: {DATABASE: postgres}
test:sqlite:
desc: Run tests for SQLite
cmds:
- task: test
vars: {DATABASE: sqlite}
test:sqlitego:
desc: Run tests for SQLite (Pure-Go implementation)
cmds:
- task: test
vars: {DATABASE: sqlitego}
test:sqlserver:
desc: Run tests for Microsoft SQL Server
cmds:
- task: test
vars: {DATABASE: sqlserver}
test:all:
desc: Run tests for all databases
deps: [test:mysql, test:postgres, test:sqlite, test:sqlitego, test:sqlserver]
# Docker tasks
docker:compose:
cmds:
- docker compose --project-directory ./integration-test {{.CMD}}
docker:compose:down:
cmds:
- task: docker:compose
vars: {CMD: down --volumes --remove-orphans}
docker:compose:up:
desc: Start docker compose with database services
deps: [docker:compose:down]
cmds:
- task: docker:compose
vars: {CMD: up --detach --no-deps --remove-orphans --force-recreate --wait}
docker:compose:logs:
desc: Start streaming docker compose logs
cmds:
- task: docker:compose
vars: {CMD: logs --follow --tail 50}
docker:test:
deps: [docker:compose:up]
cmds:
- defer: task docker:compose:down
- task: test:all