forked from go-gormigrate/gormigrate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTaskfile.yml
55 lines (44 loc) · 1010 Bytes
/
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
# https://taskfile.dev
version: '3'
tasks:
go-get-all:
cmds:
- go get -t -tags 'sqlite postgresql mysql sqlserver' ./...
lint:
desc: Runs golangci-lint
cmds:
- golangci-lint run
test-sqlite:
desc: Run tests for SQLite
cmds:
- task: test
vars: {DATABASE: sqlite}
test-pg:
desc: Run tests for PostgreSQL
cmds:
- task: test
vars: {DATABASE: postgresql}
test-mysql:
desc: Run tests for MySQL
cmds:
- task: test
vars: {DATABASE: mysql}
test-sqlserver:
desc: Run tests for Microsoft SQL Server
cmds:
- task: test
vars: {DATABASE: sqlserver}
test:
cmds:
- go test -v -tags {{.DATABASE}}
docker:
cmds:
- task: docker:build
- task: docker:test
docker:build:
cmds:
- docker build -t gormigrate .
docker:test:
cmds:
- docker-compose down -v
- docker-compose run gormigrate go test -v -tags 'postgresql sqlite mysql sqlserver'