-
Notifications
You must be signed in to change notification settings - Fork 4
quality: Parameterize branch names for test workflow #75
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
Conversation
@@ -5,10 +5,25 @@ on: | |||
paths: | |||
- '**/*' | |||
|
|||
workflow_dispatch: |
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.
π
@@ -28,4 +50,4 @@ jobs: | |||
distribution: 'adopt' | |||
|
|||
- name: Run tests | |||
run: make test-data && ./gradlew check --no-daemon --stacktrace | |||
run: make test-data branchName=${{ env.TEST_DATA_BRANCH_NAME }} && ./gradlew check --no-daemon --stacktrace |
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 need to adjust our makefile to support this? Would branchName
get overriden with main
when it's set in the makefile?
## test-data
testDataDir := src/test/resources/shared
tempDir := ${testDataDir}/temp
gitDataDir := ${tempDir}/sdk-test-data
branchName := main
githubRepoLink := https://github.com/Eppo-exp/sdk-test-data.git
.PHONY: test-data
test-data:
rm -rf $(testDataDir)
mkdir -p ${tempDir}
git clone -b ${branchName} --depth 1 --single-branch ${githubRepoLink} ${gitDataDir}
cp -r ${gitDataDir}/ufc ${testDataDir}
rm ${testDataDir}/ufc/bandit-tests/*.dynamic-typing.json
rm -rf ${tempDir}
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.
Ok I've learned more about makefiles and passing it in will indeed override π
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.
I, too, learned about this nifty feature of Makefiles when I set about this work and really appreciate how easy using Makefiles across the SDKs has made this work!
ποΈ Fixes FF-3090 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.