mirror of
https://github.com/semaphoreui/semaphore.git
synced 2024-11-23 20:35:24 +01:00
53 lines
1.4 KiB
YAML
53 lines
1.4 KiB
YAML
machine:
|
|
environment:
|
|
CPATH: "${HOME}/.go_workspace/src/github.com/ansible-semaphore"
|
|
node:
|
|
version: 8.2.0
|
|
|
|
|
|
dependencies:
|
|
pre:
|
|
- sudo apt-get install rpm
|
|
- mkdir -p ${GOPATH}/bin
|
|
- rm -rf ${CPATH} && mkdir -p ${CPATH}
|
|
- ln -sfn ${HOME}/${CIRCLE_PROJECT_REPONAME} ${CPATH}
|
|
- sudo rm -rf /usr/local/go
|
|
- sudo curl -L https://storage.googleapis.com/golang/go1.10.linux-amd64.tar.gz > /tmp/go.tar.gz
|
|
- sudo tar -C /usr/local -xzf /tmp/go.tar.gz
|
|
- go get -u -v github.com/go-task/task/cmd/task
|
|
- go get github.com/schrej/godacov
|
|
- cd ${CPATH}/${CIRCLE_PROJECT_REPONAME} && task deps
|
|
override:
|
|
- task compile
|
|
|
|
test:
|
|
pre:
|
|
- |
|
|
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
|
|
- go run cli/main.go --migrate -config config.json
|
|
override:
|
|
- cd ${CPATH}/${CIRCLE_PROJECT_REPONAME} && task test
|
|
- task build
|
|
- 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 |