Skip to content

Commit ffc0423

Browse files
authored
parameterize SDK and test data branches (#93)
1 parent 04467a0 commit ffc0423

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

.github/workflows/test.yaml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,23 @@ on:
77
pull_request:
88
paths:
99
- '**/*'
10+
workflow_dispatch:
1011
workflow_call:
12+
inputs:
13+
test_data_branch:
14+
type: string
15+
description: The branch in sdk-test-data to target for testcase files
16+
required: false
17+
default: main
18+
sdk_branch:
19+
type: string
20+
description: The branch of the SDK to test
21+
required: false
1122

1223
env:
24+
SDK_BRANCH_NAME: ${{ inputs.sdk_branch || github.head_ref || github.ref_name }}
25+
TEST_DATA_BRANCH_NAME: ${{ inputs.test_data_branch || 'main' }}
26+
1327
ORG_GRADLE_PROJECT_ossrhUsername: ${{ secrets.OSSRH_USERNAME }}
1428
ORG_GRADLE_PROJECT_ossrhPassword: ${{ secrets.OSSRH_PASSWORD }}
1529
CI: true
@@ -18,8 +32,17 @@ jobs:
1832
test-android-sdk:
1933
runs-on: ubuntu-latest
2034
steps:
35+
- name: Display Testing Details
36+
run: |
37+
echo "Running SDK Test using"
38+
echo "Test Data: sdk-test-data@${TEST_DATA_BRANCH_NAME}"
39+
echo "SDK Branch: android-sdk@${SDK_BRANCH_NAME}"
40+
2141
- name: Check out Java SDK
2242
uses: actions/checkout@v4
43+
with:
44+
repository: Eppo-exp/android-sdk
45+
ref: ${{ env.SDK_BRANCH_NAME}}
2346

2447
- name: Set up JDK 17
2548
uses: actions/setup-java@v3
@@ -34,7 +57,7 @@ jobs:
3457
echo "GRADLE_USER_HOME=${HOME}/.gradle" >> $GITHUB_ENV
3558
3659
- name: Set up test data
37-
run: make test-data
60+
run: make test-data branchName=${{env.TEST_DATA_BRANCH_NAME}}
3861

3962
- name: Wait for mock UFC DNS to resolve
4063
run: |

0 commit comments

Comments
 (0)