forked from go-gormigrate/gormigrate
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Taskfile.yml
60 lines (48 loc) · 1.09 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
# https://taskfile.org
version: '2'
tasks:
dl-deps:
desc: Downloads cli dependencies
cmds:
- go get -u golang.org/x/lint/golint
go-get-all:
cmds:
- go get -t -tags 'sqlite postgresql mysql sqlserver' ./...
lint:
desc: Runs golint on this project
cmds:
- golint .
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'