Skip to content
This repository has been archived by the owner on Feb 24, 2024. It is now read-only.

improved the travis yaml #603

Merged
merged 2 commits into from
Aug 23, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions buffalo/cmd/filetests/new_travis.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,15 @@
"path": ".travis.yml",
"contains": [
"language: go",
"1.7.x",
"master",
"1.8.x",
"go_import_path:"
]
},{
}, {
"path": "database.yml",
"contains": [
"dialect: \"sqlite3\"",
"development:",
"production:",
"test:"
]
}]
}]
40 changes: 29 additions & 11 deletions generators/newapp/new.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,20 +131,38 @@ func (a App) goGet() *exec.Cmd {
return exec.Command(envy.Get("GO_BIN", "go"), appArgs...)
}

const nTravis = `language: go
env:
- GO_ENV=test

before_script:
- psql -c 'create database {{.name}}_test;' -U postgres
- mysql -e 'CREATE DATABASE {{.name}}_test;'
- mkdir -p $TRAVIS_BUILD_DIR/public/assets
const nTravis = `
language: go

go:
- 1.7.x
- master
- 1.8.x

go_import_path: {{ .packagePath }}
env:
- GO_ENV=test

{{ if eq .dbType "postgres" -}}
services:
- postgresql
{{ end -}}

before_script:
{{ if eq .dbType "postgres" -}}
- psql -c 'create database {{.name}}_test;' -U postgres
{{ end -}}
- mkdir -p $TRAVIS_BUILD_DIR/public/assets

go_import_path: {{.packagePath}}

install:
- go get github.com/gobuffalo/buffalo/buffalo
{{ if .withDep -}}
- go get github.com/golang/dep/cmd/dep
- dep ensure
{{ else -}}
- go get $(go list ./... | grep -v /vendor/)
{{ end -}}

script: buffalo test
`

const nGitlabCi = `before_script:
Expand Down