diff options
author | Daniel Schürmann <daschuer@mixxx.org> | 2020-02-04 08:12:09 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-04 08:12:09 +0100 |
commit | 3bd9606e8f73d7669668c47d5f3d51cc606f07e3 (patch) | |
tree | ca3530b8587f8464e319c58e4442fc55477f5e77 /.travis.yml | |
parent | 0ade95f9f68485eb3bca1db571bbe38a851d4345 (diff) | |
parent | 45080e132654284ab78b71bc30d73b54215152ea (diff) |
Merge pull request #2464 from Holzhaus/pre-commit-hooks
Add pre-commit config
Diffstat (limited to '.travis.yml')
-rw-r--r-- | .travis.yml | 34 |
1 files changed, 30 insertions, 4 deletions
diff --git a/.travis.yml b/.travis.yml index 55c72603bd..795b2db536 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,19 +17,45 @@ env: jobs: include: - - name: qsscheck + - name: pre-commit + if: type != pull_request os: linux dist: xenial + # 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: + - pip3 install pre-commit + script: + - pre-commit run --all-files + addons: + apt: + packages: + - python3 + - python3-pip + - python3-setuptools + - python3-wheel + + - name: pre-commit-pr + if: type == pull_request + os: linux + dist: xenial + cache: + directories: + - $HOME/.cache/pre-commit before_install: - - pip3 install tinycss + - pip3 install pre-commit script: - - ./scripts/qsscheck.py . + - pre-commit run --origin HEAD --source origin/HEAD --show-diff-on-failure addons: apt: packages: - python3 - python3-pip - - python3-pyqt5 - python3-setuptools - python3-wheel |