From b014de1727b4fc9f929e95508baf6fa2ddee090e Mon Sep 17 00:00:00 2001 From: Adar Nimrod <nimrod@shore.co.il> Date: Fri, 12 May 2017 19:24:23 +0300 Subject: [PATCH] - Only include playbooks in pre-commit. - Add CI using Tox and TravisCI. --- .pre-commit-config.yaml | 3 ++- .travis.yml | 20 ++++++++++++++++++++ tox.ini | 7 +++++++ 3 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 .travis.yml create mode 100644 tox.ini diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ed81a75..68f0682 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,8 +9,9 @@ sha: v0.6.0 hooks: - id: ansible-syntax-check - files: \.yml$ + files: &playbooks desktop|dropbox|pkgs|skype|workstation - repo: https://github.com/willthames/ansible-lint sha: v3.4.13 hooks: - id: ansible-lint + files: *playbooks diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..533c96b --- /dev/null +++ b/.travis.yml @@ -0,0 +1,20 @@ +--- +language: python +python: "3.6" +dist: trusty +sudo: false +group: beta +cache: + - pip + - directories: + - $HOME/.pre-commit + +install: + - pip install tox | cat + +script: + - tox + +notifications: + on_failure: never + email: false diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..0699392 --- /dev/null +++ b/tox.ini @@ -0,0 +1,7 @@ +[tox] +skip_install = True +skipsdist = True + +[testenv] +deps = pre-commit +commands = pre-commit run --all-files -- GitLab