Skip to content

CI

CI #1087

Workflow file for this run

---
name: CI
"on":
push:
branches:
- trunk
pull_request:
branches:
- trunk
schedule:
- cron: "0 0 * * TUE"
jobs:
terraform:
name: Lint and format terraform
permissions:
id-token: write
contents: read
runs-on: ubuntu-latest
# https://www.terraform.io/docs/github-actions/getting-started.html
steps:
- name: Checkout repository
uses: actions/checkout@v3.6.0
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@04b98b3f9e85f563fb061be8751a0352327246b0 # v3.0.1
with:
aws-region: us-west-2
role-to-assume: arn:aws:iam::447522982029:role/gha-project-infrastructure-s3-ro-20220212013048188700000001
role-session-name: GitHubActionsSession@ci-terraform
- name: Show AWS caller identity
run: aws sts get-caller-identity
- name: "Setup Terraform"
uses: hashicorp/setup-terraform@633666f66e0061ca3b725c73b2ec20cd13a8fdd1 # v2.0.3
with:
terraform_version: 1.x
- name: "Format terraform sources"
run: terraform fmt -recursive -check -diff
- name: "Initialize aws environment"
run: terraform -chdir=aws init
- name: "Validate aws environment"
run: terraform -chdir=aws validate -no-color
- name: "Initialize github-org-artichoke environment"
run: terraform -chdir=github-org-artichoke init
- name: "Validate github-org-artichoke environment"
run: terraform -chdir=github-org-artichoke validate -no-color
- name: "Initialize github-org-artichokeruby environment"
run: terraform -chdir=github-org-artichokeruby init
- name: "Validate github-org-artichokeruby environment"
run: terraform -chdir=github-org-artichokeruby validate -no-color
- name: "Initialize github-org-artichoke-ruby environment"
run: terraform -chdir=github-org-artichoke-ruby init
- name: "Validate github-org-artichoke-ruby environment"
run: terraform -chdir=github-org-artichoke-ruby validate -no-color
- name: "Initialize remote-state environment"
run: terraform -chdir=remote-state init
- name: "Validate remote-state environment"
run: terraform -chdir=remote-state validate -no-color
ruby:
name: Lint and format Ruby
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3.6.0
- name: Install Ruby toolchain
uses: ruby/setup-ruby@250fcd6a742febb1123a77a841497ccaa8b9e939 # v1.152.0
with:
ruby-version: ".ruby-version"
bundler-cache: true
- name: Lint and check formatting with Rubocop
run: bundle exec rubocop --format github
text:
name: Lint and format text
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3.6.0
- name: Lint and check formatting with prettier
run: npx prettier --check '**/*'
- name: Lint YAML sources with yamllint
run: |
yamllint --version
echo "Linting YAML sources with yamllint ..."
yamllint --strict --format github .
echo "OK"