diff --git a/.circleci/config.yml b/.circleci/config.yml index 310075a..73c8a10 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,18 +1,23 @@ version: 2 jobs: - build: + validate: docker: - - image: trussworks/circleci-docker-primary:d1a2b3b5c3b196e91eb1c30926953d0665ec3fd1 + - image: trussworks/circleci-docker-primary:a18ba9987556eec2e48354848a3c9fb4d5b69ac8 steps: - checkout - restore_cache: keys: - pre-commit-dot-cache-{{ checksum ".pre-commit-config.yaml" }} - - pre-commit-dot-cache - run: name: Run pre-commit tests command: pre-commit run --all-files - save_cache: key: pre-commit-dot-cache-{{ checksum ".pre-commit-config.yaml" }} paths: - - ~/.cache + - ~/.cache/pre-commit + +workflows: + version: 2 + validate: + jobs: + - validate diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index eef28bf..8d31e32 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,24 +1,24 @@ repos: -- repo: git://github.com/pre-commit/pre-commit-hooks - rev: v2.1.0 + - repo: git://github.com/pre-commit/pre-commit-hooks + rev: v2.2.3 hooks: - - id: check-json - - id: check-merge-conflict - - id: check-yaml - - id: detect-private-key - - id: pretty-format-json + - id: check-json + - id: check-merge-conflict + - id: check-yaml + - id: detect-private-key + - id: pretty-format-json args: - - --autofix - - id: trailing-whitespace + - --autofix + - id: trailing-whitespace -- repo: git://github.com/antonbabenko/pre-commit-terraform - rev: v1.8.1 + - repo: git://github.com/igorshubovych/markdownlint-cli + rev: v0.17.0 hooks: - - id: terraform_docs - - id: terraform_fmt - - id: terraform_validate_no_variables + - id: markdownlint -- repo: git://github.com/igorshubovych/markdownlint-cli - rev: v0.13.0 + - repo: git://github.com/antonbabenko/pre-commit-terraform + rev: v1.12.0 hooks: - - id: markdownlint + - id: terraform_docs + - id: terraform_fmt + - id: terraform_validate_no_variables