0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-30 07:27:22 +01:00
nodejs/.travis.yml
Rich Trott 6afaebc4a0 tools: do not lint commit message if var undefined
Check that $TRAVIS_COMMIT_RANGE is set before trying to lint commit
messages in Travis CI.

Refs: https://github.com/nodejs/node/pull/23572#issuecomment-430850382
Refs: https://github.com/nodejs/node/pull/22842#issuecomment-430850049

PR-URL: https://github.com/nodejs/node/pull/23725
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matheus Marchini <mat@mmarchini.me>
2018-10-18 19:32:54 -04:00

27 lines
731 B
YAML

language: cpp
compiler:
- clang
sudo: false
cache: ccache
os: linux
matrix:
include:
- name: "Linter"
node_js: "latest"
env:
- NODE=$(which node)
script:
- make lint
# Lint the first commit in the PR.
- \[ -z "$TRAVIS_COMMIT_RANGE" \] || git log $TRAVIS_COMMIT_RANGE --pretty=format:'%h' --no-merges | tail -1 | xargs npx core-validate-commit --no-validate-metadata
- name: "Test Suite"
install:
- ./configure
- make -j2 V=
script:
- make -j2 test
before_install:
- export CXX="ccache clang++ -Qunused-arguments"
- export CC="ccache clang -Qunused-arguments -Wno-unknown-warning-option"
- export JOBS=2