forked from Caiyeon/goldfish
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcircle.yml
38 lines (35 loc) · 1.33 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
dependencies:
override:
# force clean cache
- rm -rf /home/ubuntu/.go_workspace/src
# make parent folder (since it shouldn't exist now)
- mkdir -p /home/ubuntu/.go_workspace/src/github.com/caiyeon/goldfish
# copy cloned folder into $GOPATH so vendor folder will work
- cd .. && mv -f goldfish /home/ubuntu/.go_workspace/src/github.com/caiyeon
test:
override:
- ? |
cd /home/ubuntu/.go_workspace/src/github.com/caiyeon/goldfish
# compile server binary and run acceptance tests
if [ "$CIRCLE_NODE_INDEX" -eq "0" ]; then
go build -v -a github.com/caiyeon/goldfish
./goldfish --version
echo $PWD
go test -race -p 1 $(go list ./... | grep -v /vendor/)
# compile frontend static folder from scratch
elif [ "$CIRCLE_NODE_INDEX" -eq "1" ]; then
cd frontend
nvm install v6.11.1
sudo -E env "PATH=$PATH" npm install -g cross-env
sudo -E env "PATH=$PATH" npm install -g npm@5
npm link webpack
rm -rf node_modules
npm cache clean --force
npm install
cd ..
sh build.sh
mv goldfish-linux-amd64 $CIRCLE_ARTIFACTS
mv goldfish-windows-amd64.exe $CIRCLE_ARTIFACTS
fi
:
parallel: true # make full use of 2 containers