This repository has been archived by the owner on Apr 6, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathcircle.yml
35 lines (32 loc) · 1.6 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
machine:
node:
version: 7.10.0
environment:
GOPATH: "${HOME}/.go_project"
PATH: "${PATH}:${GOPATH}/bin"
dependencies:
cache_directories:
- ~/.cache/yarn
override:
- mkdir -p ~/.go_project/src/github.com/${CIRCLE_PROJECT_USERNAME}
- ln -s ${HOME}/${CIRCLE_PROJECT_REPONAME} ${HOME}/.go_project/src/github.com/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}
- go get github.com/zenreach/go-junit-report
- touch ${CIRCLE_TEST_REPORTS}/go-report.xml
- cd web/ && yarn install
test:
override:
- cd ${HOME}/.go_project/src/github.com/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}/api/ \
&& make test | go-junit-report -set-exit-code=true -out=${CIRCLE_TEST_REPORTS}/go-report.xml
- cd web/ && yarn test -- --watch=false
- cd web/ && yarn flow
deployment:
production:
branch: master
commands:
- cd ${HOME}/.go_project/src/github.com/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}/api/ \
&& go build -o crick-api-server
- rsync -e "ssh -p 2222 -o StrictHostKeyChecking=no" -v -r -z api/migrations/*.sql snorkel@splinter.tailordev.fr:~/crick-api/production/migrations/
- rsync -e "ssh -p 2222 -o StrictHostKeyChecking=no" -v -r -z api/crick-api-server snorkel@splinter.tailordev.fr:~/crick-api/production/
- ssh -p 2222 -o StrictHostKeyChecking=no snorkel@splinter.tailordev.fr 'sudo /bin/systemctl reload crick-api.service'
- cd web/ && yarn run build
- rsync -e "ssh -p 2222 -o StrictHostKeyChecking=no" --checksum --delete -v -r -z web/build/* snorkel@splinter.tailordev.fr:~/crick-web/production/