Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
jsbroks committed May 29, 2024
1 parent 887ff23 commit 1f749bd
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 6 deletions.
26 changes: 25 additions & 1 deletion .github/workflows/handler-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ jobs:
ref: ${{ github.event.client_payload.pull_request.head.sha }}
persist-credentials: false

- name: Create URL to the run output
id: vars
run: echo ::set-output name=run-url::https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID

- name: Setup Terraform
uses: hashicorp/setup-terraform@v1
with:
Expand Down Expand Up @@ -66,5 +70,25 @@ jobs:
- name: Terraform Destroy
id: destroy
if: ${{ always() }}
if: ${{ always() && github.event.client_payload.slash_command.args.named.destroy != 'false' }}
run: terraform destroy -auto-approve -input=false -no-color

- name: Update comment
if: ${{ always() }}
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
repository: ${{ github.event.client_payload.github.payload.repository.full_name }}
comment-id: ${{ github.event.client_payload.github.payload.comment.id }}
body: |
${{ format('### Public DNS Terraform Google - Test Report', job.status == 'success' && ':white_check_mark:' || ':x:') }}
${{ format(':link: [Action Summary Page]({0})', steps.vars.outputs.run-url) }}
${{ format('- {0} Terraform Init', steps.init.outcome == 'success' && ':white_check_mark:' || ':x:') }}
${{ format('- {0} Terraform Validate', steps.validate.outcome == 'success' && ':white_check_mark:' || ':x:') }}
${{ format('- {0} Terraform Apply', steps.apply.outcome == 'success' && ':white_check_mark:' || ':x:') }}
${{ github.event.client_payload.slash_command.args.named.destroy != 'false' && format('- {0} Terraform Destroy', steps.destroy.outcome == 'success' && ':white_check_mark:' || ':x:') || '' }}
10 changes: 5 additions & 5 deletions tests/public-dns/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,18 @@ locals {
}

subdomain = "tgw-pd"
}

data "google_client_config" "current" {}
project = "playground-111"
}

data "google_dns_managed_zone" "default" {
project = data.google_client_config.current.project
project = local.project
name = "wandb-ml"
}

# Create A record which points to lb ip address
resource "google_dns_record_set" "a" {
project = data.google_client_config.current.project
project = local.project
name = "${local.subdomain}.${data.google_dns_managed_zone.default.dns_name}"
managed_zone = data.google_dns_managed_zone.default.name
type = "A"
Expand All @@ -42,7 +42,7 @@ resource "google_dns_record_set" "a" {
}

module "wandb" {
source = "../../"
source = "../.."

namespace = random_pet.main.id
license = var.license
Expand Down

0 comments on commit 1f749bd

Please sign in to comment.