forked from skalenetwork/skale-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
118 lines (112 loc) · 3.18 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
#
# TravisCI config - SKALE Manager
# Copyright (C) 2018-Present SKALE Labs
# @author Artem Payvin
#
# SKALE Manager is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# SKALE Manager is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with SKALE Manager. If not, see <https://www.gnu.org/licenses/>.
language: node_js
node_js:
- "10"
os: linux
dist: bionic
addons:
apt:
packages:
- python3-pip
- python3-setuptools
stages:
- lint
- test
- deploy
jobs:
include:
- stage: lint
script:
- pip3 install -r scripts/requirements.txt
- slither --version
- yarn fullcheck || travis_terminate 1
- bash scripts/test_deploy.sh || travis_terminate 2
- bash scripts/test_upgrade.sh || travis_terminate 3
- stage: test
env:
- TESTFOLDERS=1
script:
- bash scripts/move.sh
- bash scripts/coverage.sh
- stage: test
env:
- TESTFOLDERS=2
script:
- bash scripts/move.sh
- bash scripts/coverage.sh
- stage: test
env:
- TESTFOLDERS=3
script:
- bash scripts/move.sh
- bash scripts/coverage.sh
- stage: test
env:
- TESTFOLDERS=4
script:
- bash scripts/move.sh
- bash scripts/coverage.sh
- stage: deploy
script:
- VERSION=$(BRANCH=$TRAVIS_BRANCH bash ./scripts/calculate_version.sh)
- echo "Version $VERSION"
- export VERSION=$VERSION
- export BRANCH=$TRAVIS_BRANCH
before_deploy:
# Set up git user name and tag this commit
- (
test ! $TRAVIS_TAG &&
git config --local user.name "skale-travis" &&
git config --local user.email "$GITHUB_EMAIL" &&
export TRAVIS_TAG=$VERSION &&
git tag "$TRAVIS_TAG" &&
git push https://$GITHUB_OAUTH_TOKEN@github.com/$TRAVIS_REPO_SLUG.git $TRAVIS_TAG
) || true
deploy:
- provider: releases
api_key: "$GITHUB_OAUTH_TOKEN"
skip_cleanup: true
name: $VERSION
on:
repo: $TRAVIS_REPO_SLUG
branch:
- stable
- master
- provider: releases
api_key: "$GITHUB_OAUTH_TOKEN"
skip_cleanup: true
prerelease: true
name: $VERSION
on:
repo: $TRAVIS_REPO_SLUG
branch:
- develop
- beta
- provider: script
skip_cleanup: true
script: bash $TRAVIS_BUILD_DIR/scripts/build_and_publish.sh
on:
repo: $TRAVIS_REPO_SLUG
branch:
- master
- stable
- develop
- beta
install:
- yarn install