forked from daptin/daptin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
executable file
·64 lines (56 loc) · 1.7 KB
/
.travis.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
57
58
59
60
61
62
63
64
language: go
go:
- "1.15"
- "1.14"
- tip
sudo: required
cache:
directories:
- "daptinweb/node_modules"
services:
- docker
before_script:
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- ./cc-test-reporter before-build
script:
- ls -lah
- nvm install v13.6.0
- node -v && npm -v
- cat .travis.yml
- "echo 'mode: set' > c.out"
- go get -t ./...
- go test ./... -coverpkg github.com/daptin/daptin/... -coverprofile=coverage.txt -covermode=atomic
- ls -lah
- go get github.com/GeertJohan/go.rice/rice
- ls -lah
- go get github.com/karalabe/xgo
- go get -u -v github.com/ahmetb/govvv
- go get
- rm -rf daptinweb && git clone https://github.com/daptin/dadadash daptinweb1 && cd daptinweb1
- pwd
- npm install -g @quasar/cli
- npm install && npm rebuild node-sass
- npm run build
- cd .. && mv daptinweb1/dist/spa daptinweb && rm -rf daptinweb1
- pwd
- rice embed-go
- ls -lah
- GOOS=linux go build -a -ldflags "$(govvv -flags) -extldflags '-static'" -o main
- mkdir docker_dir
- cp ./main ./docker_dir/main
- cp ./main ./docker_dir/main
- cp Dockerfile docker_dir/Dockerfile
after_script:
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
after_success:
- if [ "$TRAVIS_BRANCH" == "master" ]; then
cp Dockerfile docker_dir/Dockerfile && cd docker_dir && docker build -t daptin/daptin:travis . && cd ..;
docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD";
docker push daptin/daptin:travis;
fi
- bash <(curl -s https://codecov.io/bash)
- cat /home/travis/gopath/src/github.com/daptin/daptin/coverage.txt
- bash <(curl -s https://copilot.blackducksoftware.com/ci/travis/scripts/upload)
notifications:
email: false