-
Notifications
You must be signed in to change notification settings - Fork 474
55 lines (45 loc) · 1.46 KB
/
code_quality_checks.yaml
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Formatting, Linting & Other Pre-Commit Checks
on:
push:
branches:
- main
pull_request:
branches:
- '**'
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [
3.11.x
]
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install -e .[ci]
- name: Install Terraform
uses: hashicorp/setup-terraform@v2
with:
terraform_version: latest
- name: Install TFLint
run: |
curl -s https://raw.githubusercontent.com/terraform-linters/tflint/master/install_linux.sh | bash
- name: Install Trivy
run: |
sudo apt-get install -y wget apt-transport-https gnupg lsb-release
wget -qO - https://aquasecurity.github.io/trivy-repo/deb/public.key | sudo apt-key add -
echo "deb https://aquasecurity.github.io/trivy-repo/deb $(lsb_release -sc) main" | sudo tee -a /etc/apt/sources.list.d/trivy.list
sudo apt-get update
sudo apt-get install -y trivy
- name: Analyze Code Quality via pre-commit checks.
run: pre-commit run --all-files