-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.travis.yml
34 lines (34 loc) · 897 Bytes
/
.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
sudo: false
language: node_js
node_js: '18'
cache:
directories:
- node_modules
git:
depth: 9999
notifications:
email: false
script:
- |
if [[ $SKIP_TESTS != 'true' ]]; then
npm prune
npm run lint
npm test -- --runInBand
fi
after_success:
- |
if [[ $TRAVIS_SECURE_ENV_VARS == 'true' ]]; then
git remote set-url origin https://cerebraljs:${GH_TOKEN}@github.com/cerebral/repo-cooker;
git config --global user.email "[email protected]";
git config --global user.name "Cerebral JS";
fi
if [[ $TRAVIS_BRANCH == 'main' || $TRAVIS_PULL_REQUEST == 'true' ]]; then
npm run coverage;
fi
if [[ $TRAVIS_BRANCH == 'main' ]] && [[ $TRAVIS_PULL_REQUEST == 'false' ]]; then
printf "//registry.npmjs.org/:_authToken=$NPM_TOKEN\n" > ~/.npmrc
npm run release
fi
branches:
except:
- "/^v\\d+\\.\\d+\\.\\d+$/"