-
Notifications
You must be signed in to change notification settings - Fork 6
/
.travis.yml
32 lines (26 loc) · 942 Bytes
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
os: linux
dist: xenial
language: python
env:
- TERRAFORM_VERSION=1.0.2 TERRAFORM_DOCS_VERSION=0.16.0
install:
# Install pre-commit
- pip install pre-commit
# Install terraform
- curl -Lo /tmp/terraform.zip "https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip"
- unzip /tmp/terraform.zip -d /tmp/
- mv /tmp/terraform ${HOME}/bin/terraform
# Install terraform-docs
- curl -Lo /tmp/terraform-docs.tar.gz "https://github.com/terraform-docs/terraform-docs/releases/download/v${TERRAFORM_DOCS_VERSION}/terraform-docs-v${TERRAFORM_DOCS_VERSION}-linux-amd64.tar.gz"
- tar -xzf /tmp/terraform-docs.tar.gz -C /tmp/
- mv /tmp/terraform-docs ${HOME}/bin/terraform-docs
jobs:
include:
- stage: lint
name: pre-commit hooks
script:
- pre-commit run --all-files --show-diff-on-failure
cache:
pip: true
directories:
- $HOME/.cache/pre-commit