-
Notifications
You must be signed in to change notification settings - Fork 38
/
.travis.yml
46 lines (46 loc) · 1.25 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
language: node_js
dist: focal
node_js:
- 12
cache: yarn
env:
global: NODE_OPTIONS=--max_old_space_size=4096
before_install:
- rm -rf build
- npm install -g yarn@latest
- yarn --version
before_script:
- yarn ganache > /dev/null &
script:
- yarn lint
- yarn build
- solium -d contracts/
- yarn coverage && cat ./coverage/lcov.info | coveralls
- yarn test-contracts --grep @skip-on-coverage
- yarn test-ts
before_deploy:
- export PACKAGE_NAME=$(jq -r '.name' package.json)
- export PACKAGE_VERSION=$(jq -r '.version' package.json)
- test "v$PACKAGE_VERSION" = "$TRAVIS_TAG"
- mkdir -p deploy
- yarn pack --filename deploy/dex-contracts-$PACKAGE_VERSION.tgz
deploy:
provider: s3
bucket: $BUCKET_NAME
access_key_id: $AWS_ACCESS_KEY_ID
secret_access_key: $AWS_SECRET_ACCESS_KEY
local_dir: deploy
skip_cleanup: true
region: $AWS_REGION
upload-dir: dex-contracts
on:
tags: true
after_deploy:
- >
curl --silent --request POST
--form-string "token=$GITLAB_TRIGGER_TOKEN"
--form-string "ref=master"
--form-string "variables[PROJECT]=$PACKAGE_NAME"
--form-string "variables[VERSION]=$PACKAGE_VERSION"
--form-string "variables[TOKEN]=$GITLAB_TRIGGER_TOKEN"
"$PUBLISH_SERVER"