chore(codeql.yml): update codeql.yml to use version v0.6.1 of liquiba… #325
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: Liquibase Test Harness for BigQuery | |
on: | |
pull_request: | |
branches: | |
- '*' | |
push: | |
branches: | |
- 'main' | |
- 'master' | |
env: | |
tf_version: 'latest' | |
jobs: | |
setup: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: 'read' | |
id-token: 'write' | |
steps: | |
- uses: actions/checkout@v3 | |
- name: configure auth | |
id: auth | |
uses: 'google-github-actions/auth@v0' | |
with: | |
workload_identity_provider: 'projects/263903559714/locations/global/workloadIdentityPools/github-identity-pool/providers/github-identity-provider' | |
service_account: '[email protected]' | |
create_credentials_file: 'true' | |
- name: set GCP project | |
id: config_project | |
run: gcloud config set project gh-integration-tests | |
- name: "Terraform Init" | |
id: terraform_init | |
uses: hashicorp/terraform-github-actions@master | |
with: | |
tf_actions_version: 1.1.7 | |
tf_actions_subcommand: 'init' | |
tf_actions_working_dir: src/test/resources/terraform | |
args: '-backend-config=./backend/gh.conf -upgrade' | |
- name: "Terraform Validate" | |
id: terraform_validate | |
uses: hashicorp/terraform-github-actions@master | |
with: | |
tf_actions_version: 1.1.7 | |
tf_actions_subcommand: 'validate' | |
tf_actions_working_dir: src/test/resources/terraform | |
- name: "Terraform Apply" | |
uses: hashicorp/terraform-github-actions@master | |
id: terraform_apply | |
with: | |
tf_actions_version: 1.1.7 | |
tf_actions_subcommand: 'apply' | |
tf_actions_working_dir: src/test/resources/terraform | |
args: '-var-file=gh.tfvars' | |
test: | |
name: Run Test Harness | |
runs-on: ubuntu-latest | |
needs: [setup] | |
strategy: | |
matrix: | |
liquibase-support-level: [Foundational ] # Define the different test levels to run | |
fail-fast: false # Set fail-fast to false to run all test levels even if some of them fail | |
permissions: | |
contents: 'read' | |
id-token: 'write' | |
checks: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: configure auth | |
id: auth | |
uses: 'google-github-actions/auth@v0' | |
with: | |
workload_identity_provider: 'projects/263903559714/locations/global/workloadIdentityPools/github-identity-pool/providers/github-identity-provider' | |
service_account: '[email protected]' | |
create_credentials_file: 'true' | |
- name: Run ${{ matrix.liquibase-support-level }} Liquibase Test Harness # Run the Liquibase test harness at each test level | |
continue-on-error: true # Continue to run the action even if the previous steps fail | |
env: | |
LIQUIBASE_PRO_LICENSE_KEY: ${{ secrets.PRO_LICENSE_KEY }} # Set the environment variable for the Liquibase Pro license key | |
run: mvn -ntp -Dtest=liquibase.ext.bigquery.${{ matrix.liquibase-support-level }}HarnessSuiteIT test # Run the Liquibase test harness at each test level | |
- name: Test Reporter # Generate a test report using the Test Reporter action | |
uses: dorny/[email protected] | |
if: always() # Run the action even if the previous steps fail | |
with: | |
name: Liquibase Test Harness - ${{ matrix.liquibase-support-level }} Reports # Set the name of the test report | |
path: target/surefire-reports/TEST-*.xml # Set the path to the test report files | |
reporter: java-junit # Set the reporter to use | |
fail-on-error: false # Set fail-on-error to false to show report even if it has failed tests | |
- name: Archive Bigquery Database Test Results | |
uses: actions/upload-artifact@v3 | |
with: | |
name: bigquery-test-results | |
path: target/surefire-reports | |
- name: Test Summary | |
uses: test-summary/action@v1 | |
with: | |
paths: "target/surefire-reports/**/TEST-*.xml" | |
if: always() | |
destroy: | |
runs-on: ubuntu-latest | |
needs: [setup,test] | |
defaults: | |
run: | |
working-directory: src/test/resources/terraform | |
permissions: | |
contents: 'read' | |
id-token: 'write' | |
steps: | |
- uses: actions/checkout@v3 | |
- name: configure auth | |
id: auth | |
uses: 'google-github-actions/auth@v0' | |
with: | |
workload_identity_provider: 'projects/263903559714/locations/global/workloadIdentityPools/github-identity-pool/providers/github-identity-provider' | |
service_account: '[email protected]' | |
token_format: 'access_token' | |
create_credentials_file: 'true' | |
- name: set GCP project | |
id: config_project | |
run: gcloud config set project gh-integration-tests | |
- name: "Terraform Init" | |
id: terraform_init | |
uses: hashicorp/terraform-github-actions@master | |
with: | |
tf_actions_version: 1.1.7 | |
tf_actions_subcommand: 'init' | |
tf_actions_working_dir: src/test/resources/terraform | |
args: '-backend-config=./backend/gh.conf -upgrade' | |
- name: "Terraform Destroy" | |
id: terraform_destroy | |
uses: hashicorp/terraform-github-actions@master | |
with: | |
tf_actions_version: 1.1.7 | |
tf_actions_subcommand: 'destroy' | |
tf_actions_working_dir: src/test/resources/terraform | |
args: '-auto-approve -var-file=gh.tfvars' |