From 2a5e49e98d3da2c45cdcbf40b31f64a0924dc529 Mon Sep 17 00:00:00 2001 From: Ty Potter Date: Tue, 20 Aug 2024 15:04:23 -0600 Subject: [PATCH 1/2] parameterize branches --- .github/workflows/lint-test-sdk.yml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/lint-test-sdk.yml b/.github/workflows/lint-test-sdk.yml index 64cf5dd..c27c56c 100644 --- a/.github/workflows/lint-test-sdk.yml +++ b/.github/workflows/lint-test-sdk.yml @@ -5,10 +5,25 @@ on: paths: - '**/*' + workflow_dispatch: + + workflow_call: + inputs: + test_data_branch: + type: string + description: The branch in sdk-test-data to target for testcase files + required: false + default: main + sdk_branch: + type: string + description: The branch of the SDK to test + required: false env: ORG_GRADLE_PROJECT_ossrhUsername: ${{ secrets.OSSRH_USERNAME }} ORG_GRADLE_PROJECT_ossrhPassword: ${{ secrets.OSSRH_PASSWORD }} CI: true + SDK_BRANCH_NAME: ${{ inputs.sdk_branch || github.head_ref || github.ref_name || 'main' }} + TEST_DATA_BRANCH_NAME: ${{ inputs.test_data_branch || 'main' }} jobs: lint-test-sdk: @@ -19,6 +34,8 @@ jobs: steps: - uses: actions/checkout@v4 with: + repository: Eppo-exp/java-server-sdk + ref: ${{ env.SDK_BRANCH_NAME }} fetch-depth: 0 - name: Set up JDK ${{ matrix.java-version }} @@ -28,4 +45,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 From f5abc207e5a4ed7ff9eebd5a55c2ba6810d8b047 Mon Sep 17 00:00:00 2001 From: Ty Potter Date: Tue, 20 Aug 2024 15:12:46 -0600 Subject: [PATCH 2/2] display test details --- .github/workflows/lint-test-sdk.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/lint-test-sdk.yml b/.github/workflows/lint-test-sdk.yml index c27c56c..3cf5c19 100644 --- a/.github/workflows/lint-test-sdk.yml +++ b/.github/workflows/lint-test-sdk.yml @@ -32,6 +32,11 @@ jobs: matrix: java-version: ['8', '11', '17'] # Define the Java versions to test against steps: + - name: Display Testing Details + run: | + echo "Running SDK Test using" + echo "Test Data: sdk-test-data@${TEST_DATA_BRANCH_NAME}" + echo "SDK Branch: php-sdk@${SDK_BRANCH_NAME}" - uses: actions/checkout@v4 with: repository: Eppo-exp/java-server-sdk