infrastructure/.github/workflows/ci.yml

35 lines
926 B
YAML
Raw Normal View History

2020-06-15 13:06:38 +01:00
name: CI
2019-12-08 12:07:57 +00:00
on: [push]
jobs:
2020-06-15 13:06:38 +01:00
ansible:
2019-12-08 12:07:57 +00:00
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
2020-04-23 20:54:54 +01:00
- uses: actions/cache@v1
with:
path: ~/.cache/pip
2020-06-15 13:12:53 +01:00
key: pip-${{ hashFiles('ansible/requirements.txt') }}-${{ hashFiles('ansible/dev-requirements.txt') }}
2019-12-08 12:07:57 +00:00
- name: Install dependencies
run: ./scripts/ansible/setup.sh
2019-12-08 12:07:57 +00:00
- name: Run linters
run: ./scripts/ansible/lint.sh
2020-06-15 13:06:38 +01:00
terraform:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Install terraform
uses: hashicorp/setup-terraform@v1
2020-06-15 13:06:38 +01:00
with:
terraform_version: "0.13.0"
2020-06-15 13:06:38 +01:00
- name: Initialize Terraform
run: ./scripts/terraform/terraform.sh init -backend=false
- name: Lint
run: ./scripts/terraform/lint.sh