Skip to content

Commit 55bc758

Browse files
authored
Merge pull request #111 from nut-tree/feature/110/ci_setup
Feature/110/ci setup
2 parents 169518c + ab0d4ae commit 55bc758

File tree

3 files changed

+62
-35
lines changed

3 files changed

+62
-35
lines changed

.build/run_linux.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ set -e
33

44
echo $PWD
55

6-
docker exec nut-ci bash -c "bash $PWD/.build/build.sh ${PWD} ${NODE_VERSION}"
6+
docker exec nut-ci bash -c "bash $PWD/.build/build.sh ${PWD} ${TRAVIS_NODE_VERSION}"

.travis.yml

Lines changed: 59 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
11
cache: npm
22

3+
os:
4+
- osx
5+
- linux
6+
7+
osx_image:
8+
- xcode11
9+
10+
dist: bionic
11+
12+
language: node_js
13+
14+
node_js:
15+
- lts/dubnium
16+
- lts/erbium
17+
- 11
18+
- 12.13.0
19+
320
addons:
421
sonarcloud:
522
organization: "nut-tree"
@@ -9,42 +26,51 @@ addons:
926
services:
1027
- docker
1128

12-
matrix:
13-
include:
14-
- name: "Linux Node 10"
15-
os: linux
16-
dist: xenial
17-
env: NODE_VERSION=10
18-
- name: "Linux Node 11"
19-
os: linux
20-
dist: xenial
21-
env: NODE_VERSION=11
22-
- name: "Linux Node 12"
23-
os: linux
24-
dist: xenial
25-
env: NODE_VERSION=12
26-
- name: "macOS Node 10"
27-
os: osx
28-
osx_image: xcode11
29-
language: node_js
30-
node_js: "10"
31-
- name: "macOS Node 11"
32-
os: osx
33-
osx_image: xcode11
34-
language: node_js
35-
node_js: "11"
36-
- name: "macOS Node 12"
37-
os: osx
38-
osx_image: xcode11
39-
language: node_js
40-
node_js: "12.13.0"
41-
4229
before_install:
4330
- "bash ./.build/setup_${TRAVIS_OS_NAME}.sh"
4431
install: true
45-
4632
script:
4733
- "bash ./.build/run_${TRAVIS_OS_NAME}.sh"
4834

49-
after_success:
50-
- sonar-scanner
35+
stages:
36+
- sonar
37+
- test
38+
- name: deploy
39+
if: tag IS present
40+
41+
jobs:
42+
exclude:
43+
- stage: test
44+
node_js: 12.13.0
45+
os: linux
46+
- stage: test
47+
node_js: lts/erbium
48+
os: linux
49+
50+
include:
51+
- stage: sonar
52+
os: linux
53+
dist: bionic
54+
node_js: lts/erbium
55+
after_success:
56+
- sonar-scanner
57+
- stage: deploy
58+
os: osx
59+
osx_image: xcode11
60+
language: node_js
61+
node_js: lts/erbium
62+
install: true
63+
script: true
64+
before_deploy:
65+
- echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" >> $HOME/.npmrc 2> /dev/null
66+
deploy:
67+
- provider: script
68+
skip_cleanup: false
69+
script: npm run publish-next
70+
on:
71+
branch: develop
72+
- provider: script
73+
skip_cleanup: false
74+
script: npm publish
75+
on:
76+
tags: true

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@
5050
"coverage": "jest --coverage",
5151
"lint": "tslint -p tsconfig.json",
5252
"watch": "tsc -w -p .",
53-
"prepublishOnly": "npm run compile && npm test",
53+
"publish-next": "bump prerelease --preid next && npm publish --tag next",
54+
"prepublishOnly": "npm run compile",
5455
"versionBump": "bump --tag --push --all",
5556
"typedoc": "typedoc --options ./typedoc.js --out ./docs lib/"
5657
},

0 commit comments

Comments
 (0)