-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
68 lines (67 loc) · 3.95 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
language: python
dist: jammy
python:
- 3.8.3
git:
depth: 2
cache:
directories:
- ".cache"
before_install:
- set -e
- ". $HOME/.nvm/nvm.sh"
- nvm ls
- nvm ls-remote
- nvm install v18.17.0
- rm -rf node_modules
# common commands
- npm ci --include=dev
- git checkout package.json package-lock.json
- git config pull.rebase false
- git fetch --depth=1 --no-tags --verbose --progress
- pip install tox cryptography requests ruff # common packages
- pip install twine # used to publish python package
- pip install pyopenssl aiohttp # used to run real-time tests
- pip install typing-extensions # required by python <3.11
- php -i | grep php.ini
- composer install
script:
- ./build.sh 2>&1
- git checkout master composer.json
- if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_BRANCH" = "master" ]; then
export SHOULD_DEPLOY=false;
DEPLOY_OUTPUT=$(env DEPLOY_CACHE=.cache/deploy SECONDS_BEFORE_NEXT_DEPLOY=43200 TRAVIS_COMMIT_MESSAGE="${TRAVIS_COMMIT_MESSAGE}" ./build/deploy.sh) && SHOULD_DEPLOY=true;
echo "----------------";
echo "${DEPLOY_OUTPUT}";
echo "${SHOULD_DEPLOY}";
echo "----------------";
if $SHOULD_DEPLOY; then
echo "Publishing";
npm config set git-tag-version=false && NPM_VERSION=$(npm version patch);
npm run vss && npm run copy-python-files;
env COMMIT_MESSAGE=${NPM_VERSION:1} GITHUB_TOKEN=${GITHUB_TOKEN} SHOULD_TAG=${SHOULD_DEPLOY} ./build/push.sh;
cd python && env PYPI_TOKEN=${PYPI_TOKEN} ./deploy.sh && cd ..;
else
echo "Not publishing";
env COMMIT_MESSAGE="${TRAVIS_COMMIT_MESSAGE}" GITHUB_TOKEN=${GITHUB_TOKEN} SHOULD_TAG=${SHOULD_DEPLOY} ./build/push.sh;
fi;
fi
after_failure:
- sleep 10
before_deploy:
- echo $SHOULD_DEPLOY
deploy:
- provider: npm
email: [email protected]
api_key:
secure: euGp3OIlxbY+ZqgJYOAE1MH4EyCVIRLxMksHcj+w/V6MEkRchLIUDE68kLdK5ZUFGHnoFQtR1N65i428gvcjy8P/0K0p9maVpZaHuk0Q2GrnIAAe0D6jZu2s2D0JPhWCZ5U4Aiek5ExhTblEYWTwOtpG/JwAa+2/IT+2DvtNf37HBM0tEvI3FLRexTv74vMDH172681UFHz2h0dvfgOzBwCiydsp6eihnV90AetsYT4Y9VpZDjAdmATO1ydLw8SnH2skWssmH8snyDDVOPkdu6mRBHZB6ckSZzyQLiIbn4dlzAt6Zi1/NjSJg4z/+vIK8o8SOHPu3AkCab+E6kBeuCBnphquIa/i3bToxJSa1AScisg+5rQZCsY/L7ey8El/nOvVn7B6xATk7w4Cm/dy5gTyriNqgFoJvDLhlntfPp+7w9GGc7Hi6UL9RWw0CCW9c2I1cyDmNpSv95gspMJAI847ykaHgXl01Cxo2yWGqwxpCR/suqdTySvo3NgqFQrM2aRkPQT+yQlL2hrrqX2l2w7gU+2y9W89WB/75x674RR3fpSID6HGrt52frZDk1mgi6ggHv0ta+hOHQCIhLM7tB/pR9ehF4RGcVjRTEBa0CG2XeXDWDFDjLEzZPmvf6vCL+PDMk91sR6YB+djsaPEwLV6pjWngYSrNdYVe1djdl8=
on:
condition: $SHOULD_DEPLOY = true
after_deploy:
- cat ~/.npm/_logs/*-debug.log
env:
global:
# PYPI_TOKEN
- secure: QCQa8tn40loCqSx9tR7PFAa7h5Gucl9IaEARiskiPF3zlLoZTst6ThnFl1rQDKx2jIJsN1z8Vwd12I4kYGED+Tgd345kE+J/n2hVEpTwSB+oOUWlwgkTQbCQB0XxPJRPila9lt3Ogpbvrp//L7IkFM06gu+N+qwQEOjn7dkLrVAkg5vl9nouuzqHadaQ1oOMG/v3DgP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