This repository has been archived by the owner on Oct 6, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 166
/
Copy pathcircle.yml
56 lines (51 loc) · 1.48 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
53
54
55
56
version: 2
jobs:
integration_tests:
working_directory: /go/src/github.com/caiyeon/goldfish
docker:
- image: circleci/golang:1.10.2-browsers
steps:
- checkout
- run:
name: Run integration tests
command: go test -race -p 1 ./...
- run:
name: Build binary without frontend
command: |
go build -v -a github.com/caiyeon/goldfish
./goldfish --version
compile:
working_directory: /go/src/github.com/caiyeon/goldfish
docker:
- image: circleci/golang:1.10.2-browsers
steps:
- checkout
- run:
name: Install nvm, node, and npm
command: |
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
echo 'export NVM_DIR=$HOME/.nvm' >> $BASH_ENV
touch $HOME/.nvmrc
echo 'source $NVM_DIR/nvm.sh' >> $BASH_ENV
- run:
name: Compile frontend and final binary
command: |
cd frontend
nvm install v8.2.0
sudo -E env "PATH=$PATH" npm install -g cross-env
npm link webpack
rm -rf node_modules
npm cache clean --force
npm install
cd ..
sh build.sh
- store_artifacts:
path: goldfish-windows-amd64.exe
- store_artifacts:
path: goldfish-linux-amd64
workflows:
version: 2
test_and_compile:
jobs:
- integration_tests
- compile