Skip to content

.github/workflows/ci.yml #2124

.github/workflows/ci.yml

.github/workflows/ci.yml #2124

Workflow file for this run

on:
pull_request:
paths-ignore:
- '*.md'
- 'docs/**'
push:
paths-ignore:
- '*.md'
- 'docs/**'
branches:
- main
- release-*
schedule:
- cron: "0 11 * * 1-5"
jobs:
lint:
name: Linting
if: "!contains(github.event.head_commit.message, '[skip ci]')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: hashicorp/setup-terraform@v3
with:
terraform_version: 1.8.1
- name: 'Terraform Format'
run: terraform fmt -check -recursive
- name: 'Terraform Init cluster'
run: terraform init
working-directory: 'examples/cluster'
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
role-skip-session-tagging: true
- name: 'Terraform Validate cluster'
run: terraform validate
working-directory: 'examples/cluster'
cluster-test:
name: Test cluster module
if: "!contains(github.event.head_commit.message, '[skip ci]')"
runs-on: ubuntu-latest
steps:
- name: 'Checkout'
uses: actions/checkout@main
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
role-skip-session-tagging: true
- name: 'Terratest'
uses: ./.github/actions/terratest
with:
args: "-run TestTerraformAwsEksCluster"