-
-
Notifications
You must be signed in to change notification settings - Fork 80
/
Taskfile.yml
82 lines (66 loc) · 1.57 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
80
81
82
# https://taskfile.dev
version: '3'
tasks:
build:
cmds:
- go build -v -tags sqlite -o ./testfixtures{{exeExt}} ./cmd/testfixtures
lint:
desc: Runs golangci-lint
cmds:
- golangci-lint run
test-cli:
cmds:
- ./testfixtures -d sqlite -c testdb.sqlite3 -D testdata/fixtures
test:pg:
desc: Test PostgreSQL
cmds:
- task: test-db
vars: {DATABASE: postgresql}
test:mysql:
desc: Test MySQL
cmds:
- task: test-db
vars: {DATABASE: mysql}
test:sqlite:
desc: Test SQLite
cmds:
- task: test-db
vars: {DATABASE: sqlite}
test:sqlserver:
desc: Test SQLServer
cmds:
- task: test-db
vars: {DATABASE: sqlserver}
test:crdb:
desc: Test CockroachDB
cmds:
- task: test-db
vars: {DATABASE: cockroachdb}
test:clickhouse:
desc: Test Clickhouse
cmds:
- task: test-db
vars: {DATABASE: clickhouse}
test:spanner:
desc: Test Spanner with GoogleSQL dialect
cmds:
- task: test-db
vars: {DATABASE: spanner}
test-db:
cmds:
- go test -v -tags {{.DATABASE}}
goreleaser:test:
desc: Tests release process without publishing
cmds:
- goreleaser --snapshot --clean
docker:
cmds:
- task: docker:build
- task: docker:test
docker:build:
cmds:
- docker build -t testfixtures .
docker:test:
cmds:
- docker compose down -v --remove-orphans
- docker compose run testfixtures go test -v -tags 'postgresql sqlite mysql sqlserver cockroachdb clickhouse spanner'