gorm-goose/.travis.yml

61 lines
2.6 KiB
YAML
Raw Normal View History

language: go
cache:
directories:
- "$GOPATH/pkg/mod"
install: true
addons:
artifacts:
debug: true
go:
- 1.13.x
env:
global:
- GOPROXY=https://proxy.golang.org
- GO111MODULE=on
- GOARCH=amd64
- GO_FOR_RELEASE=1.13
jobs:
allow_failures:
- go: master
include:
- go: master
env: JOB=test
script:
- go test -race -coverprofile=coverage.txt -covermode=atomic ./...
after_success:
- bash <(curl -s https://codecov.io/bash)
- stage: build
script:
- go get -t -v ./...
- CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "-s -w
-X 'github.com/go-migration/gorm-goose/version.BuildVersion=`git tag|tail -n1`'
-X 'github.com/go-migration/gorm-goose/version.BuildHash=`git rev-parse HEAD`'
-X 'github.com/go-migration/gorm-goose/version.BuildTime=`date`'"
-o ./gorm-goose-x64.linux ./cmd/gorm-goose/
- CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -ldflags "-s -w
-X 'github.com/go-migration/gorm-goose/version.BuildVersion=`git tag|tail -n1`'
-X 'github.com/go-migration/gorm-goose/version.BuildHash=`git rev-parse HEAD`'
-X 'github.com/go-migration/gorm-goose/version.BuildTime=`date`'"
-o ./gorm-goose-x64.macos ./cmd/gorm-goose/
- CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags "-s -w
-X 'github.com/go-migration/gorm-goose/version.BuildVersion=`git tag|tail -n1`'
-X 'github.com/go-migration/gorm-goose/version.BuildHash=`git rev-parse HEAD`'
-X 'github.com/go-migration/gorm-goose/version.BuildTime=`date`'"
-o ./gorm-goose-x64.exe ./cmd/gorm-goose/
deploy:
provider: releases
api_key:
secure: FgbZF11lCGwGWjnd+9A4Wn1mSE9Iv3p1g7cjZyQ5CeT5HULkWC3HioZACyl6TtKV7Mtvz8CEOBb24clkDyzbmBNV8E8p5Sb+IkOiYm7T5ardTi1R+PAuhE7AAwT8kR25JtZSTjXaOrAdzgcqp8S/eID1e+PpOAgs1GWEKgvE4ff8Q4WGJs7edipdBJjLyWwHlKFjAIb+53eRZcrKpP0M+oVMS9E/IT7Dax0n+rIeJ45P9XO+xvIREW8eTM+xHY+J94tXKylY5kXU/4IZ4iLMDbN84lrs7T+QeeViSNxkfCpinapFIpkbxbgNH6EXEBUXXe6LmcZA2VnyVIHHwbiA3CsSn4UjCn4DSiTaOtPDNnqPFdhApvxKgeTP/qvi1HPpkI/g7xrwvdd/QZCwVaLnY+C4T55wj0qdaceIpj0dbDFNm1IcRtLmqXxZ3wL374O/PlAtFW8K/dVmYYKeMZ7sS/78ou6tNoj7bqWigg3B7fz+AOmhuOre8TY18rlFj9Icw8Ck+2jk0Cb0WCbZNfak9RMFfRa3mBJwx/tKIq8ZwtJB03JOf7UZqFkQ3EmoUYEX3exdSldfJQL2KHHHAhgMOR2/Qn5k/U0WAtvB3R8qdga6iwxHFHgM8FuTDt1qitFIE+lpbq0hjHfF5yW0MoivlwF7n8e8B7M5tHy8FD2qNLI=
skip_cleanup: true
file:
- gorm-goose-x64.linux
- gorm-goose-x64.macos
- gorm-goose-x64.exe
on:
repo: go-migration/gorm-goose
tags: true
notifications:
email:
on_success: change
on_failure: always