Skip to content
Closed
Show file tree
Hide file tree
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
32 changes: 32 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,38 @@ env:

jobs:
include:
- name: pre-commit
if: type != pull_request
language: python
python: 3.7
# There are too many files in the repo that have formatting issues. We'll
# disable these checks for now when pushing directly (but still run these
# on Pull Requests!).
env: SKIP=end-of-file-fixer,trailing-whitespace,clang-format,eslint
cache:
directories:
- $HOME/.cache/pre-commit
before_install:
- pip install pre-commit==2.5.1
script:
- pre-commit run --all-files
addons: []

- name: pre-commit-pr
if: type == pull_request
language: python
python: 3.7
cache:
directories:
- $HOME/.cache/pre-commit
before_install:
- pip install pre-commit==2.5.1
script:
# HEAD is the not yet integrated PR merge commit +refs/pull/xxxx/merge
# HEAD^1 is the PR target branch and HEAD^2 is the HEAD of the source branch
- pre-commit run --from-ref HEAD^1 --to-ref HEAD --show-diff-on-failure
addons: []

- name: Ubuntu/gcc/SCons build
compiler: gcc
# Ubuntu Bionic build prerequisites
Expand Down