-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change references in samples tests to correct versions #1790
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,17 +4,9 @@ on: | |
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: "Radius version number to use (e.g. 0.1.0, 0.1.0-rc1, edge). Defaults to edge." | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I removed this default to disambiguate how "defaults" work |
||
description: "Radius version number to use (e.g. 0.1.0, 0.1.0-rc1, edge)." | ||
required: false | ||
default: "edge" | ||
type: string | ||
push: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think we need to run on push There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I still think we should test on pushes. even if the PR runs pass, we've sometimes seen failures on pushes in other repos and runs There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok, I re-added this trigger
willdavsmith marked this conversation as resolved.
Show resolved
Hide resolved
|
||
branches: | ||
- v*.* | ||
- edge | ||
paths: | ||
- "samples/**" | ||
- ".github/workflows/**" | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
branches: | ||
|
@@ -93,7 +85,6 @@ jobs: | |
credential: aws | ||
enableDapr: false | ||
env: | ||
BRANCH: ${{ github.base_ref || github.ref_name }} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this was unused |
||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
AZURE_LOCATION: westus3 | ||
AWS_REGION: us-west-2 | ||
|
@@ -123,6 +114,40 @@ jobs: | |
echo "TEST_EKS_CLUSTER_NAME=eks-${RUN_IDENTIFIER}" >> $GITHUB_OUTPUT | ||
echo "RUN_TEST=${RUN_TEST}" >> $GITHUB_OUTPUT | ||
echo "ENABLE_DAPR=${ENABLE_DAPR}" >> $GITHUB_OUTPUT | ||
- name: Generate Radius version variables | ||
id: gen-radius-version | ||
if: steps.gen-id.outputs.RUN_TEST == 'true' | ||
run: | | ||
RADIUS_VERSION=edge | ||
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then | ||
RADIUS_VERSION=${{ github.event.inputs.version }} | ||
elif [[ "${{ github.event_name }}" == "pull_request" ]]; then | ||
# Get the target branch of the pull request | ||
TARGET_BRANCH=${{ github.event.pull_request.base.ref }} | ||
if [[ "$TARGET_BRANCH" == "edge" ]]; then | ||
RADIUS_VERSION=edge | ||
elif [[ "$TARGET_BRANCH" =~ ^refs/pull/v[0-9]+\.[0-9]+/merge$ ]]; then | ||
# Example: refs/pull/v0.1/merge -> 0.1 | ||
RADIUS_VERSION=$(echo ${{ github.ref }} | cut -d '/' -f 3 | cut -d 'v' -f 2) | ||
fi | ||
elif [[ "${{ github.event_name }}" == "schedule" ]]; then | ||
# Get the branch of the schedule event | ||
TARGET_BRANCH=${{ github.ref }} | ||
if [[ "$TARGET_BRANCH" == "refs/heads/edge" ]]; then | ||
RADIUS_VERSION=edge | ||
elif [[ "$TARGET_BRANCH" =~ ^refs/heads/v[0-9]+\.[0-9]+$ ]]; then | ||
# Example: refs/heads/v0.1 -> 0.1 | ||
RADIUS_VERSION=$(echo ${{ github.ref }} | cut -d '/' -f 3 | cut -d 'v' -f 2) | ||
else | ||
echo "Invalid branch name: $TARGET_BRANCH" | ||
exit 1 | ||
fi | ||
else | ||
echo "Invalid event name: ${{ github.event_name }}" | ||
exit 1 | ||
fi | ||
|
||
echo "RADIUS_VERSION=$RADIUS_VERSION" >> $GITHUB_OUTPUT | ||
- name: Checkout code | ||
if: steps.gen-id.outputs.RUN_TEST == 'true' | ||
uses: actions/checkout@v4 | ||
|
@@ -213,11 +238,7 @@ jobs: | |
- name: Download rad CLI | ||
if: steps.gen-id.outputs.RUN_TEST == 'true' | ||
run: | | ||
RADIUS_VERSION="${{ inputs.version }}" | ||
if [[ -z "${{ inputs.version }}" ]]; then | ||
RADIUS_VERSION=edge | ||
fi | ||
./.github/scripts/install-radius.sh $RADIUS_VERSION | ||
./.github/scripts/install-radius.sh ${{ steps.gen-radius-version.outputs.RADIUS_VERSION }} | ||
- name: Initialize default environment | ||
if: steps.gen-id.outputs.RUN_TEST == 'true' | ||
run: | | ||
|
@@ -231,10 +252,10 @@ jobs: | |
rad group switch default | ||
rad env create default | ||
rad env switch default | ||
rad recipe register default -e default -w default --template-kind bicep --template-path ghcr.io/radius-project/recipes/local-dev/rediscaches:latest --resource-type Applications.Datastores/redisCaches | ||
rad recipe register default -e default -w default --template-kind bicep --template-path ghcr.io/radius-project/recipes/local-dev/mongodatabases:latest --resource-type Applications.Datastores/mongoDatabases | ||
rad recipe register default -e default -w default --template-kind bicep --template-path ghcr.io/radius-project/recipes/local-dev/sqldatabases:latest --resource-type Applications.Datastores/sqlDatabases | ||
rad recipe register default -e default -w default --template-kind bicep --template-path ghcr.io/radius-project/recipes/local-dev/rabbitmqqueues:latest --resource-type Applications.Messaging/rabbitMQQueues | ||
rad recipe register default -e default -w default --template-kind bicep --template-path ghcr.io/radius-project/recipes/local-dev/rediscaches:${{ steps.gen-radius-version.outputs.RADIUS_VERSION }} --resource-type Applications.Datastores/redisCaches | ||
sk593 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
rad recipe register default -e default -w default --template-kind bicep --template-path ghcr.io/radius-project/recipes/local-dev/mongodatabases:${{ steps.gen-radius-version.outputs.RADIUS_VERSION }} --resource-type Applications.Datastores/mongoDatabases | ||
rad recipe register default -e default -w default --template-kind bicep --template-path ghcr.io/radius-project/recipes/local-dev/sqldatabases:${{ steps.gen-radius-version.outputs.RADIUS_VERSION }} --resource-type Applications.Datastores/sqlDatabases | ||
rad recipe register default -e default -w default --template-kind bicep --template-path ghcr.io/radius-project/recipes/local-dev/rabbitmqqueues:${{ steps.gen-radius-version.outputs.RADIUS_VERSION }} --resource-type Applications.Messaging/rabbitMQQueues | ||
- name: Configure cloud credentials | ||
if: steps.gen-id.outputs.RUN_TEST == 'true' && ( matrix.credential == 'azure' || matrix.credential == 'aws') | ||
run: | | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is what we do for docs as well: https://github.com/radius-project/docs/blob/943c2cf3ea6b0d5cc24b06f6fa9de54e14207355/.github/scripts/release-docs.sh#L48