Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
willdavsmith committed Mar 7, 2024
1 parent 3baec57 commit 2698a4c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
13 changes: 9 additions & 4 deletions .github/actions/save-pr-as-artifact/action.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
name: "Save PR number as artifact"
description: "Save PR number as artifact"
name: "Save PR data as artifact"
description: "Save PR data as artifact"
runs:
using: "composite"
steps:
- name: Save PR number
- name: Save PR data
shell: bash
env:
PR_NUMBER: ${{ github.event.number }}
PR_REF: ${{ github.head_ref }}
run: |
mkdir -p ./pr
echo $PR_NUMBER > ./pr/pr_number
echo $PR_REF > ./pr/pr_ref
- uses: actions/upload-artifact@v3
with:
name: pr_number
path: pr/

- uses: actions/upload-artifact@v3
with:
name: pr_ref
path: pr/
21 changes: 8 additions & 13 deletions .github/workflows/functional-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,6 @@ env:
AZURE_KEYVAULT_CSI_DRIVER_VER: '1.4.2'
# Azure workload identity webhook chart version
AZURE_WORKLOAD_IDENTITY_WEBHOOK_VER: '1.1.0'
# Container registry for storing container images
CONTAINER_REGISTRY: ghcr.io/radius-project/dev
# Container registry for storing Bicep recipe artifacts
BICEP_RECIPE_REGISTRY: ghcr.io/radius-project/dev
# The radius functional test timeout
FUNCTIONALTEST_TIMEOUT: 60m
# The Azure Location to store test resources
Expand All @@ -71,6 +67,11 @@ env:
# Server where terraform test modules are deployed
TF_RECIPE_MODULE_SERVER_URL: "http://tf-module-server.radius-test-tf-module-server.svc.cluster.local"

BICEP_RECIPE_REGISTRY: ghcr.io/willdavsmith/radius
CONTAINER_REGISTRY: ghcr.io/willdavsmith/radius
FUNCTIONAL_TEST_APP_ID: 811142
IMAGE_SRC: "https://github.com/willdavsmith/radius"

jobs:
build:
name: Build Radius for test
Expand Down Expand Up @@ -101,18 +102,12 @@ jobs:
run: |
echo "CHECKOUT_REPO=${{ github.repository }}" >> $GITHUB_ENV
echo "CHECKOUT_REF=refs/heads/main" >> $GITHUB_ENV
- name: Set up checkout target (pull_request)
if: github.event_name == 'pull_request'
run: |
echo "CHECKOUT_REPO=${{ github.repository }}" >> $GITHUB_ENV
echo "CHECKOUT_REF=${{ github.ref }}" >> $GITHUB_ENV
echo "PR_NUMBER=${{ github.event.pull_request.number }}" >> $GITHUB_ENV
- name: Use custom actions
uses: actions/checkout@v3
- name: 'Download PR data artifacts'
if: github.event_name == 'workflow_run'
uses: ./.github/actions/download-pr-data-artifact
id: get-pr-number
id: get-pr-data
- name: 'Set PR context (workflow_run)'
if: github.event_name == 'workflow_run'
uses: actions/github-script@v6
Expand All @@ -124,8 +119,8 @@ jobs:
// Set environment variables
fs.appendFileSync(process.env.GITHUB_ENV,
`CHECKOUT_REPO=${payload.head_repository.full_name}\n`+
`CHECKOUT_REF=${payload.head_sha}\n` +
`PR_NUMBER=${{ steps.get-pr-number.outputs.pr_number }}\n`);
`CHECKOUT_REF=${{ steps.get-pr-data.outputs.pr_ref }}\n` +
`PR_NUMBER=${{ steps.get-pr-data.outputs.pr_number }}\n`);
- name: Set DE image and tag (repository_dispatch from de-functional-test)
if: github.event_name == 'repository_dispatch'
uses: actions/github-script@v6
Expand Down

0 comments on commit 2698a4c

Please sign in to comment.