Skip to content

CI: npm-audit cronjob in travis #239

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 29, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 22 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,37 @@ language: node_js
branches:
except:
- /^greenkeeper.*/

stages:
- name: test
if: type IN (push, pull_request, api)
- name: cron
if: type IN (cron, api)

# Test against Long Term Support (LTS) releases in a "current", "active", and
# "maintenance" status: https://nodejs.org/en/about/releases/
node_js:
- 14
- 12
- 10
install:
- npm install -g codecov
- npm install
- npm ci # install from package-lock.json
script:
- npm run lint
- travis_retry npm test
after_success:
- npm install -g codecov
- npm run codecov

include:
jobs:
- name: deps:npm-audit
stage: cron
install:
- npm ci --production
script:
- npm audit
after_success:
- echo "package-lock.json is considered secure according to 'npm audit'."
after_failure:
- echo "package-lock.json should be updated with 'npm audit fix'."