-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdev.yml
51 lines (48 loc) · 1.85 KB
/
dev.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
name: survilleray
env:
DATABASE_URL: "postgres://postgres:[email protected]:5432/survilleray_development"
DATABASE_TEST_URL: "postgres://postgres:[email protected]:5432/survilleray_test"
PGPASSWORD: docker
up:
- homebrew:
- golangci/tap/golangci-lint
- postgresql
- go:
version: 1.13
modules: true
- railgun
- custom:
name: Create PostgreSQL database
met?: psql --username=postgres --host=survilleray.railgun -lqt | cut -d \| -f 1 | grep -qw survilleray_development
meet: createdb --username=postgres --host=survilleray.railgun survilleray_development
name: Create PostgreSQL test database
met?: psql --username=postgres --host=survilleray.railgun -lqt | cut -d \| -f 1 | grep -qw survilleray_test
meet: createdb --username=postgres --host=survilleray.railgun survilleray_test
- custom:
name: Build command line tools
met?: test -f "bin/survilleray"
meet: go build -o bin/survilleray cmd/survilleray/main.go
- custom:
name: Load dependencies
met?: go mod tidy
meet: go mod tidy
commands:
acquire: bin/survilleray acquire
build: go build -o bin/survilleray cmd/survilleray/main.go
collect: bin/survilleray collect
db:create:
desc: "Drop current database"
run: createdb --username=postgres --host=survilleray.railgun survilleray_development
db:drop:
desc: "Drop current database"
run: dropdb --username=postgres --host=survilleray.railgun survilleray_development
db:migrate:
desc: "Run all migrations"
run: bin/survilleray migrate
db:shell:
desc: "Open a db shell"
run: psql --username=postgres --host=survilleray.railgun survilleray_development
lint: golangci-lint run
schedule: bin/survilleray schedule
test: DATABASE_URL=$DATABASE_TEST_URL go test -cover -race ./...
vectorize: bin/survilleray vectorize