feat: DEVOP-4544| Remove the deprecated attributes from terraform-gcp-sql component module #218
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: terratest | |
permissions: | |
contents: write | |
pull-requests: write | |
on: | |
workflow_dispatch: | |
pull_request: | |
branches: | |
- main | |
paths: | |
- 'modules/**' | |
- 'examples/**' | |
- 'test/**' | |
push: | |
branches: | |
- main | |
env: | |
TERRATEST_GOOGLE_CREDENTIALS: ${{ secrets.TERRATEST_GOOGLE_CREDENTIALS }} | |
GOOGLE_PROJECT: ${{ secrets.TERRATEST_GOOGLE_PROJECT }} | |
GCP_SA_EMAIL: ${{ secrets.TERRATEST_GCP_SA_EMAIL }} | |
TF_VAR_google_project: ${{ secrets.TERRATEST_GOOGLE_PROJECT }} | |
TF_VAR_google_credentials: ${{ secrets.TERRATEST_GOOGLE_CREDENTIALS }} | |
TF_VAR_shared_vpc_host_google_credentials: ${{ secrets.TERRATEST_GOOGLE_CREDENTIALS }} | |
TF_VAR_google_region: ${{ secrets.TERRATEST_GOOGLE_REGION }} | |
jobs: | |
terratest: | |
name: terratest | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v4 # Updated to latest version | |
with: | |
submodules: true | |
- name: Set up Go | |
uses: actions/setup-go@v5 # Updated to latest version | |
with: | |
go-version: '^1.21.0' | |
cache-dependency-path: | # cache go modules to run faster | |
**/go.sum | |
**/go.mod | |
id: go | |
- name: Login to Google Cloud | |
uses: google-github-actions/auth@v2 # Updated to latest version | |
with: | |
credentials_json: ${{ env.TERRATEST_GOOGLE_CREDENTIALS }} | |
- name: Set Google Cloud project | |
run: gcloud config set project ${{ env.GOOGLE_PROJECT }} | |
- name: Run terratest | |
run: | | |
make tests | |
- name: Release | |
uses: cycjimmy/semantic-release-action@v4 | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
extra_plugins: | | |
@semantic-release/git@10.0.1 | |
@semantic-release/exec@6.0.3 | |
@semantic-release/changelog@6.0.1 | |
- name: Clear GCloud Config | |
if: always() | |
run: gcloud config unset project |