-
Notifications
You must be signed in to change notification settings - Fork 2
34 lines (32 loc) · 1013 Bytes
/
pre-commit.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
33
34
name: pre-commit
on:
pull_request:
workflow_dispatch:
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: '3.11'
- name: Read .terraform-version
id: tf_version
run: echo "TF_VERSION=$(cat .terraform-version)" >> $GITHUB_ENV
- name: Setup Terraform
uses: hashicorp/setup-terraform@v3
with:
terraform_version: ${{ env.TF_VERSION }}
- name: Install Hadolint for pre-commit hook
run: |
wget -O /usr/local/bin/hadolint https://github.com/hadolint/hadolint/releases/latest/download/hadolint-Linux-x86_64
chmod +x /usr/local/bin/hadolint
# - name: Install dependencies for Python tests
# run: |
# pip install -e ".[test]"
# - uses: pre-commit/[email protected]
# with:
# extra_args: --all-files
# - name: Test with pytest
# run: |
# pytest -vv --gherkin-terminal-reporter unity-test/unit