forked from IBM/audit-ci
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
26 lines (22 loc) · 835 Bytes
/
.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
language: node_js
node_js:
- "12"
- "14"
- "16"
install:
- npm ci
# In your code, add this (after installing with `npm install --save-dev audit-ci`):
# scripts:
# # This script should be the first that runs to reduce the risk of
# # executing a script from a compromised NPM package.
# - if [ "${TRAVIS_PULL_REQUEST}" != "false" ]; then audit-ci -m; fi
# Docs: https://docs.travis-ci.com/user/languages/javascript-with-nodejs/#caching-with-npm
# Changelog: https://changelog.travis-ci.com/for-node-js-builds-cache-npm-shortcut-is-available-77295
cache: npm
script:
# Have audit-ci run audit-ci to audit itself :)
# Temporary to properly test TypeScript PR
- npm run build
- if [ "${TRAVIS_PULL_REQUEST}" != "false" ]; then node dist/audit-ci.js --config ./audit-ci.jsonc; fi
- npm run lint
- npm run test