Skip to content
This repository was archived by the owner on Apr 9, 2023. It is now read-only.

Commit 2b1c545

Browse files
authored
pipeline: upgrade travis with auto-release and security checks (#81)
* pipeline: simplify travis cache and install scripts This makes proper use of the newly added lockfile. It will detect if `npm ci` or `npm install` can be executed and will use the appropriate cache mechanism. https://docs.travis-ci.com/user/languages/javascript-with-nodejs/#npm-ci-support * pipeline: use latest node and lts versions for testing * pipeline: add semantic release dry runs in travis This helps a lot ensuring the expected version is generated when actually creating releases. * pipeline: add npm audit as mandatory test step * pipeline: add automatic release script for main branch
1 parent a2267eb commit 2b1c545

File tree

1 file changed

+20
-6
lines changed

1 file changed

+20
-6
lines changed

.travis.yml

+20-6
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,33 @@
11
---
22
language: node_js
33
node_js:
4-
- node
4+
- 11
5+
- 10
6+
- 8
57
os:
68
- linux
79
- osx
8-
cache:
9-
directories:
10-
- node_modules
11-
install:
12-
- npm install
10+
cache: npm
1311
script:
1412
- npx commitlint-travis
1513
- npx stylelint './src/**/*.js'
1614
- npx eslint ./src
1715
- npx react-scripts test --coverage
16+
- npm audit
1817
after_success:
1918
- npx codecov
19+
deploy:
20+
- provider: script
21+
skip_cleanup: true
22+
script: npx semantic-release --dry-run --branch develop
23+
on:
24+
node: 11
25+
branch: develop
26+
condition: $TRAVIS_OS_NAME = linux
27+
- provider: script
28+
skip_cleanup: true
29+
script: npx semantic-release
30+
on:
31+
node: 11
32+
branch: master
33+
condition: $TRAVIS_OS_NAME = linux

0 commit comments

Comments
 (0)