2016-05-21 01:13:16 +02:00
|
|
|
machine:
|
|
|
|
environment:
|
|
|
|
CPATH: "/home/ubuntu/.go_workspace/src/github.com/ansible-semaphore/semaphore/"
|
|
|
|
|
2016-01-05 00:32:53 +01:00
|
|
|
dependencies:
|
|
|
|
pre:
|
2016-12-21 10:36:54 +01:00
|
|
|
- sudo rm -rf /usr/local/go
|
2018-03-05 18:16:48 +01:00
|
|
|
- sudo curl -L https://storage.googleapis.com/golang/go1.10.linux-amd64.tar.gz > /tmp/go.tar.gz
|
2016-12-21 10:36:54 +01:00
|
|
|
- sudo tar -C /usr/local -xzf /tmp/go.tar.gz
|
2018-03-07 23:02:15 +01:00
|
|
|
- go get -u -v github.com/go-task/task/cmd/task
|
|
|
|
- task deps
|
2016-01-05 00:32:53 +01:00
|
|
|
override:
|
2018-03-07 23:02:15 +01:00
|
|
|
- mkdir -p $CPATH
|
|
|
|
- rsync -azC --delete ./ $CPATH
|
|
|
|
- task compile
|
2016-01-05 00:32:53 +01:00
|
|
|
|
|
|
|
test:
|
|
|
|
pre:
|
2018-03-07 23:02:15 +01:00
|
|
|
- | cat > config.json <<EOF
|
|
|
|
{
|
|
|
|
"mysql": {
|
|
|
|
"host": "127.0.0.1:3306",
|
|
|
|
"user": "ubuntu",
|
|
|
|
"pass": "",
|
|
|
|
"name": "circle_test"
|
|
|
|
},
|
|
|
|
"session_db": "127.0.0.1:6379",
|
|
|
|
"port": ":8010",
|
|
|
|
"email_alert": false
|
|
|
|
}
|
|
|
|
EOF
|
2018-03-05 18:19:55 +01:00
|
|
|
- cd $CPATH && go run cli/main.go --migrate -config config.json
|
2016-01-05 00:32:53 +01:00
|
|
|
override:
|
2018-03-07 23:02:15 +01:00
|
|
|
- task test
|
|
|
|
- task build
|
|
|
|
- task ci:artifacts
|