forked from semaphoreui/semaphore
-
Notifications
You must be signed in to change notification settings - Fork 0
/
circle.yml
52 lines (48 loc) · 1.41 KB
/
circle.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
machine:
environment:
CPATH: "${HOME}/.go_workspace/src/github.com/ansible-semaphore"
node:
version: 8.2.0
dependencies:
pre:
- sudo apt-get install rpm
- 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