-
Notifications
You must be signed in to change notification settings - Fork 0
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
quality: parameterize branch names and make test #96
Conversation
required: false | ||
|
||
env: | ||
SDK_BRANCH_NAME: ${{ inputs.sdk_branch || github.head_ref || github.ref_name || 'main' }} |
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.
Do we want a fallback to main
here? I would think merges to main would be covered by github.ref_name
, wouldn't it? If that's the case, it might make sense to throw an error if inputs.sdk_branch || github.head_ref || github.ref_name
result in an empty $SDK_BRANCH_NAME
since that would indicate something was wrong with the configuration.
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.
You are right that the main
fallback here is superfluous. Looking at Actions/checkout readme and code, the ref will be computed as the triggering branch or the default branch if ref
is omitted or is a blank string.
The checkout action will throw an error when the refspec doesn't exist, stopping the workflow and displays an error message indicating as much. I'm not sure throwing our own error here would add much, to be honest, but I am trying to get these all hooked up so I can move on to the SDK packaging and integration testing so I may be biased.
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.
The checkout action will throw an error when the refspec doesn't exist
Ah, right. This is a good callout. Okay, cool.
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.
Looking great so far! Nothing blocking - just a question about falling back to 'main'
ποΈ Fixes FF-3092 towards FF-3085
π―ββοΈ Related PRs
Motivation
Changes are often made to the sdk-test-data repository to capture new behaviours, bugs and edge cases. When these changes are pushed to
main
, the SDKs are cloned locally (locally to the github action running) and their respective tests are run. These tests are set up and run by copies of the SDK test workflows - see sdk-test-data workflow. There are a number of limitations to this setup:sdk-test-data
Description of Changes
This change
π - Each SDK's testing workflow is enhanced into a reusable workflow, exposing parameters for SDK branch and the sdk-test-data branch to use in testing.
External to this Change
sdk-test-data get two testing workflows.