quality: Parameterize branch names for test workflow#75
Merged
Conversation
felipecsl
approved these changes
Aug 29, 2024
aarsilv
reviewed
Aug 29, 2024
| paths: | ||
| - '**/*' | ||
|
|
||
| workflow_dispatch: |
|
|
||
| - 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 |
Collaborator
There was a problem hiding this comment.
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}
Collaborator
There was a problem hiding this comment.
Ok I've learned more about makefiles and passing it in will indeed override 👌
Collaborator
Author
There was a problem hiding this comment.
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!
aarsilv
approved these changes
Aug 29, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎟️ 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-dataDescription 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.