Semaphore/circle.yml

52 lines
1.4 KiB
YAML
Raw Normal View History

2016-05-21 01:13:16 +02:00
machine:
environment:
CPATH: "${HOME}/.go_workspace/src/github.com/ansible-semaphore"
node:
version: 8.2.0
2016-05-21 01:13:16 +02:00
2016-01-05 00:32:53 +01:00
dependencies:
pre:
- sudo apt-get install rpm
- rm -rf ${CPATH} && mkdir -p ${CPATH}
- ln -sfn ${HOME}/${CIRCLE_PROJECT_REPONAME} ${CPATH}
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
2018-03-11 01:52:31 +01:00
- go get github.com/schrej/godacov
2018-03-11 15:22:50 +01:00
- cd ${CPATH}/${CIRCLE_PROJECT_REPONAME} && task deps
2016-01-05 00:32:53 +01:00
override:
- task compile
2016-01-05 00:32:53 +01:00
test:
pre:
- |
cat > config.json <<EOF
2018-03-07 23:02:15 +01:00
{
"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
- go run cli/main.go --migrate -config config.json
2016-01-05 00:32:53 +01:00
override:
2018-03-11 01:52:31 +01:00
- cd ${CPATH}/${CIRCLE_PROJECT_REPONAME} && task test
2018-03-07 23:02:15 +01:00
- task build
2018-03-11 01:52:31 +01:00
- task ci:artifacts
post:
# We don't export the coverage secret to forks so we need this to always return successfully
- godacov -t "${CODACY_TOKEN}" -r ./coverage.out -c "${CIRCLE_SHA1}" || true
deployment:
tag:
tag: /v[0-9]+(\.[0-9]+)*(-.*)*/
owner: ansible-semaphore
commands:
- curl -sL https://git.io/goreleaser | bash