Skip to content

Commit

Permalink
Add smoke tests
Browse files Browse the repository at this point in the history
  • Loading branch information
johnake committed Feb 9, 2024
1 parent 4669144 commit e35bba5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
10 changes: 8 additions & 2 deletions .github/actions/deploy-environment/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ runs:
DOCKER_IMAGE_TAG: ${{ inputs.docker-image }}
PR_NUMBER: ${{ inputs.pull-request-number }}

- name: Set up Terraform outputs as env vars
shell: bash
run: |
echo "CLAIMS_EXTERNAL_HOST=$(terraform output -raw claims_web_external_hostname)" >> $GITHUB_ENV
echo "PLACEMENTS_EXTERNAL_HOST=$(terraform output -raw placements_web_external_hostname)" >> $GITHUB_ENV
- name: Set up Ruby 3.2.2
uses: ruby/setup-ruby@v1
with:
Expand All @@ -53,5 +59,5 @@ runs:
run: bin/bundle exec rspec --tag smoke_test -b
env:
SMOKE_TEST: "true"
CLAIMS_EXTERNAL_HOST: "track-and-pay-${{ inputs.environment }}.test.teacherservices.cloud"
PLACEMENTS_EXTERNAL_HOST: "manage-school-placements-${{ inputs.environment }}.test.teacherservices.cloud"
CLAIMS_EXTERNAL_HOST: ${{ env.CLAIMS_EXTERNAL_HOST }}
PLACEMENTS_EXTERNAL_HOST: ${{ env.PLACEMENTS_EXTERNAL_HOST }}
10 changes: 8 additions & 2 deletions terraform/application/output.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
output "url" {
value = module.web_application.url
# Access the first hostname
output "claims_web_external_hostname" {
value = module.web_application.web_external_hostnames[0]
}

# Access the second hostname
output "placements_external_hostname" {
value = module.web_application.web_external_hostnames[1]
}

0 comments on commit e35bba5

Please sign in to comment.