mirror of
https://github.com/kevin-DL/revel-cmd.git
synced 2026-01-11 18:54:31 +00:00
Added CI
This commit is contained in:
85
.travis.yml
Normal file
85
.travis.yml
Normal file
@@ -0,0 +1,85 @@
|
|||||||
|
language: go
|
||||||
|
|
||||||
|
go:
|
||||||
|
- 1.8
|
||||||
|
- 1.9
|
||||||
|
- 1.10
|
||||||
|
- 1.11
|
||||||
|
- tip
|
||||||
|
|
||||||
|
os:
|
||||||
|
- linux
|
||||||
|
- osx
|
||||||
|
- windows
|
||||||
|
|
||||||
|
sudo: false
|
||||||
|
|
||||||
|
branches:
|
||||||
|
only:
|
||||||
|
- master
|
||||||
|
- develop
|
||||||
|
|
||||||
|
services:
|
||||||
|
- memcache
|
||||||
|
- redis-server
|
||||||
|
|
||||||
|
before_install:
|
||||||
|
# TRAVIS_OS_NAME - linux and osx
|
||||||
|
- echo $TRAVIS_OS_NAME
|
||||||
|
- |
|
||||||
|
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
||||||
|
brew update && brew install memcached redis && brew services start redis && brew services start memcached
|
||||||
|
fi
|
||||||
|
- redis-server --daemonize yes
|
||||||
|
- redis-cli info
|
||||||
|
|
||||||
|
install:
|
||||||
|
# Setting environments variables
|
||||||
|
- export PATH=$PATH:$HOME/gopath/bin
|
||||||
|
- export REVEL_BRANCH="develop"
|
||||||
|
- 'if [[ "$TRAVIS_BRANCH" == "master" ]]; then export REVEL_BRANCH="master"; fi'
|
||||||
|
- 'echo "Travis branch: $TRAVIS_BRANCH, Revel dependency branch: $REVEL_BRANCH"'
|
||||||
|
- git clone -b $REVEL_BRANCH git://github.com/revel/modules ../modules/
|
||||||
|
- git clone -b $REVEL_BRANCH git://github.com/revel/cmd ../cmd/
|
||||||
|
- git clone -b $REVEL_BRANCH git://github.com/revel/config ../config/
|
||||||
|
- git clone -b $REVEL_BRANCH git://github.com/revel/cron ../cron/
|
||||||
|
- git clone -b $REVEL_BRANCH git://github.com/revel/examples ../examples/
|
||||||
|
- go get -v github.com/revel/revel/...
|
||||||
|
- go get -v github.com/revel/cmd/revel
|
||||||
|
- go get -v github.com/golang/deps
|
||||||
|
|
||||||
|
script:
|
||||||
|
- go test -v github.com/revel/cmd/...
|
||||||
|
|
||||||
|
# Ensure the new-app flow works (plus the other commands).
|
||||||
|
- revel version
|
||||||
|
- revel new my/testapp
|
||||||
|
- revel test my/testapp
|
||||||
|
- revel clean my/testapp
|
||||||
|
- revel build my/testapp build/testapp
|
||||||
|
- revel build my/testapp build/testapp prod
|
||||||
|
- revel package my/testapp
|
||||||
|
- revel package my/testapp prod
|
||||||
|
|
||||||
|
# Ensure the new-app flow works (plus the other commands).
|
||||||
|
- revel new -a my/testapp2
|
||||||
|
- revel test -a my/testapp2
|
||||||
|
- revel clean -a my/testapp2
|
||||||
|
- revel build -a my/testapp2 -t build/testapp
|
||||||
|
- revel build -a my/testapp2 -t build/testapp -m prod
|
||||||
|
- revel package -a my/testapp2
|
||||||
|
- revel package -a my/testapp2 -m prod
|
||||||
|
|
||||||
|
- revel new -a my/testapp3 -V
|
||||||
|
- revel test -a my/testapp3
|
||||||
|
- revel clean -a my/testapp3
|
||||||
|
- revel build -a my/testapp3 -t build/testapp
|
||||||
|
- revel build -a my/testapp3 -t build/testapp -m prod
|
||||||
|
- revel package -a my/testapp3
|
||||||
|
- revel package -a my/testapp3 -m prod
|
||||||
|
|
||||||
|
matrix:
|
||||||
|
allow_failures:
|
||||||
|
- go: tip
|
||||||
|
- go: 1.6
|
||||||
|
os: osx
|
||||||
@@ -146,7 +146,7 @@ func NewRevelPaths(mode, importPath, srcPath string, callback RevelCallback) (rp
|
|||||||
mode = config.DefaultSection
|
mode = config.DefaultSection
|
||||||
}
|
}
|
||||||
if !rp.Config.HasSection(mode) {
|
if !rp.Config.HasSection(mode) {
|
||||||
utils.Logger.Fatal("app.conf: No mode found:", mode)
|
utils.Logger.Fatal("app.conf: No mode found:","run-more", mode)
|
||||||
}
|
}
|
||||||
rp.Config.SetSection(mode)
|
rp.Config.SetSection(mode)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user