Skip to content

Commit e48a953

Browse files
authored
Merge pull request #239 from consideRatio/ci-travis-cronjob
CI: npm-audit cronjob in travis
2 parents 79b0c8b + 8d95c95 commit e48a953

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

.travis.yml

+22-2
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,37 @@ language: node_js
22
branches:
33
except:
44
- /^greenkeeper.*/
5+
6+
stages:
7+
- name: test
8+
if: type IN (push, pull_request, api)
9+
- name: cron
10+
if: type IN (cron, api)
11+
512
# Test against Long Term Support (LTS) releases in a "current", "active", and
613
# "maintenance" status: https://nodejs.org/en/about/releases/
714
node_js:
815
- 14
916
- 12
1017
- 10
1118
install:
12-
- npm install -g codecov
13-
- npm install
19+
- npm ci # install from package-lock.json
1420
script:
1521
- npm run lint
1622
- travis_retry npm test
1723
after_success:
24+
- npm install -g codecov
1825
- npm run codecov
26+
27+
include:
28+
jobs:
29+
- name: deps:npm-audit
30+
stage: cron
31+
install:
32+
- npm ci --production
33+
script:
34+
- npm audit
35+
after_success:
36+
- echo "package-lock.json is considered secure according to 'npm audit'."
37+
after_failure:
38+
- echo "package-lock.json should be updated with 'npm audit fix'."

0 commit comments

Comments
 (0)