Skip to content

Commit

Permalink
Create validation-and-linting.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
arnavrneo authored May 6, 2024
1 parent f55dcf5 commit d8fc884
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/validation-and-linting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Linting and Validation Tests

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Install Helm
run: |
curl https://baltocdn.com/helm/signing.asc | gpg --dearmor | sudo tee /usr/share/keyrings/helm.gpg > /dev/null
sudo apt-get install apt-transport-https --yes
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/helm.gpg] https://baltocdn.com/helm/stable/debian/ all main" | sudo tee /etc/apt/sources.list.d/helm-stable-debian.list
sudo apt-get update --yes
sudo apt-get install helm --yes
- name: Install Terraform
run: |
sudo apt-get update && sudo apt-get install -y gnupg software-properties-common
wget -O- https://apt.releases.hashicorp.com/gpg | gpg --dearmor | sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg > /dev/null
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
sudo apt update --yes
sudo apt-get install terraform --yes
- name: Helm Validation
working-directory: backend/fastapi-helm-chart
run: helm template .

- name: Helm Linting
working-directory: backend/fastapi-helm-chart
run: helm lint .

- name: Terraform Config Validation
working-directory: backend/tf
run: terraform validate

- name: Terraform Config Linting
working-directory: backend/tf
run: terraform fmt



0 comments on commit d8fc884

Please sign in to comment.