forked from IBM/qjslib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
54 lines (48 loc) · 1.19 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
dist: xenial
language: node_js
node_js:
- "16"
before_script:
- export DISPLAY=:99.0
- npm ci
services:
- xvfb
addons:
chrome: stable
sonarcloud:
token:
secure: "${SONAR_CLOUD_TOKEN}"
script:
- npm run lint && npm run test
- if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ -z "$TRAVIS_TAG" ] && [ "$TRAVIS_REPO_SLUG" == "ibm/qpylib" ]; then sonar-scanner; fi # sonar only on non-PRs
after_success:
- if [[ $TRAVIS_TAG ]]; then
npm version --no-git-tag-version "${TRAVIS_TAG}";
npm run build;
npm run docs;
npm pack;
git config --global user.email "qjslib@ibm.com";
git config --global user.name "QJSLib CI";
git clone https://${GITHUB_OAUTH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.wiki.git;
cp -rf docs/* qjslib.wiki/;
cd qjslib.wiki;
git add .;
git commit -m "${TRAVIS_TAG}";
git push;
cd ..;
else
npm run build;
fi
deploy:
- provider: releases
api_key: "${GITHUB_OAUTH_TOKEN}"
file: "qjslib-${TRAVIS_TAG}.tgz"
skip_cleanup: true
on:
tags: true
- provider: npm
email: "${NPM_EMAIL}"
api_key: "${NPM_OAUTH_TOKEN}"
skip_cleanup: true
on:
tags: true