Skip to content

Commit 2a5e49e

Browse files
committed
parameterize branches
1 parent 4cc8de2 commit 2a5e49e

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

.github/workflows/lint-test-sdk.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,25 @@ on:
55
paths:
66
- '**/*'
77

8+
workflow_dispatch:
9+
10+
workflow_call:
11+
inputs:
12+
test_data_branch:
13+
type: string
14+
description: The branch in sdk-test-data to target for testcase files
15+
required: false
16+
default: main
17+
sdk_branch:
18+
type: string
19+
description: The branch of the SDK to test
20+
required: false
821
env:
922
ORG_GRADLE_PROJECT_ossrhUsername: ${{ secrets.OSSRH_USERNAME }}
1023
ORG_GRADLE_PROJECT_ossrhPassword: ${{ secrets.OSSRH_PASSWORD }}
1124
CI: true
25+
SDK_BRANCH_NAME: ${{ inputs.sdk_branch || github.head_ref || github.ref_name || 'main' }}
26+
TEST_DATA_BRANCH_NAME: ${{ inputs.test_data_branch || 'main' }}
1227

1328
jobs:
1429
lint-test-sdk:
@@ -19,6 +34,8 @@ jobs:
1934
steps:
2035
- uses: actions/checkout@v4
2136
with:
37+
repository: Eppo-exp/java-server-sdk
38+
ref: ${{ env.SDK_BRANCH_NAME }}
2239
fetch-depth: 0
2340

2441
- name: Set up JDK ${{ matrix.java-version }}
@@ -28,4 +45,4 @@ jobs:
2845
distribution: 'adopt'
2946

3047
- name: Run tests
31-
run: make test-data && ./gradlew check --no-daemon --stacktrace
48+
run: make test-data branchName=${{ env.TEST_DATA_BRANCH_NAME }} && ./gradlew check --no-daemon --stacktrace

0 commit comments

Comments
 (0)