From b4f1759e944430d0fdb297d8a4f5be5195e21260 Mon Sep 17 00:00:00 2001 From: Shruthi Kumar Date: Mon, 27 Jan 2025 11:39:55 -0800 Subject: [PATCH] Restore bicep artifacts before starting tests (#8283) # Description This change restores Bicep artifacts before running any tests. This will avoid any restoration errors while the tests are running as seen in #8184 ## Type of change - This pull request fixes a bug in Radius and has an approved issue #8184 - This pull request adds or changes features of Radius and has an approved issue (issue link required). - This pull request is a minor refactor, code cleanup, test improvement, or other maintenance task and doesn't change the functionality of Radius (issue link optional). Fixes: #8184 ## Contributor checklist Please verify that the PR meets the following requirements, where applicable: - [ ] An overview of proposed schema changes is included in a linked GitHub issue. - [ ] A design document PR is created in the [design-notes repository](https://github.com/radius-project/design-notes/), if new APIs are being introduced. - [ ] If applicable, design document has been reviewed and approved by Radius maintainers/approvers. - [ ] A PR for the [samples repository](https://github.com/radius-project/samples) is created, if existing samples are affected by the changes in this PR. - [ ] A PR for the [documentation repository](https://github.com/radius-project/docs) is created, if the changes in this PR affect the documentation or any user facing updates are made. - [ ] A PR for the [recipes repository](https://github.com/radius-project/recipes) is created, if existing recipes are affected by the changes in this PR. - [ ] --------- Signed-off-by: sk593 --- .github/workflows/functional-test-cloud.yaml | 7 +++++++ .github/workflows/functional-test-noncloud.yaml | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/functional-test-cloud.yaml b/.github/workflows/functional-test-cloud.yaml index a55c7ee5dd..cd97500868 100644 --- a/.github/workflows/functional-test-cloud.yaml +++ b/.github/workflows/functional-test-cloud.yaml @@ -758,6 +758,13 @@ jobs: } } EOF + - name: Restore Bicep artifacts before running functional tests + # The exact files chosen to run the command can be changed, but we need 1 that uses the Radius extension and 1 that uses the AWS extension so we can restore both Bicep artifacts before the tests start + run: | + # Restore Radius Bicep types + bicep restore ./test/functional-portable/corerp/cloud/resources/testdata/corerp-azure-connection-database-service.bicep --force + # Restore AWS Bicep types + bicep restore ./test/functional-portable/corerp/cloud/resources/testdata/aws-s3-bucket.bicep --force - name: Run functional tests run: | # Ensure rad cli is in path before running tests. diff --git a/.github/workflows/functional-test-noncloud.yaml b/.github/workflows/functional-test-noncloud.yaml index bfccf79e05..ce6b602e09 100644 --- a/.github/workflows/functional-test-noncloud.yaml +++ b/.github/workflows/functional-test-noncloud.yaml @@ -374,7 +374,7 @@ jobs: BICEP_RECIPE_TAG_VERSION: ${{ env.REL_VERSION }} TEMP_CERT_DIR: ${{ steps.create-local-registry.outputs.temp-cert-dir }} SSL_CERT_FILE: ${{ steps.create-local-registry.outputs.temp-cert-dir }}/certs/${{ env.LOCAL_REGISTRY_SERVER }}/client.crt - + - name: Run functional tests run: | # Ensure rad cli is in path before running tests.