Skip to content

Commit 691f7ac

Browse files
authored
feat: Allow testing workflow to be reused and provide target branch for test data.
1 parent 0d44751 commit 691f7ac

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

.github/workflows/ci.yml

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,21 @@ on:
55
branches:
66
- main
77
pull_request:
8+
workflow_call:
9+
inputs:
10+
test_data_branch:
11+
type: string
12+
description: The branch in sdk-test-data to target for testcase files
13+
required: false
14+
sdk_branch:
15+
type: string
16+
description: The branch of the SDK to test
17+
required: false
818

919
env:
1020
CARGO_TERM_COLOR: always
21+
SDK_BRANCH: ${{ inputs.sdk_branch || github.ref || 'main' }}
22+
TEST_DATA_BRANCH: ${{ inputs.test_data_branch || 'main' }}
1123

1224
jobs:
1325
cargo_build_and_test:
@@ -20,7 +32,17 @@ jobs:
2032
steps:
2133
- uses: actions/checkout@v4
2234
with:
23-
submodules: true
35+
submodules: ${{ !inputs.test_data_branch }}
36+
repository: Eppo-exp/eppo-multiplatform
37+
ref: ${{ env.SDK_BRANCH }}
38+
39+
- uses: actions/checkout@v4
40+
if: ${{ inputs.test_data_branch }}
41+
with:
42+
repository: Eppo-exp/sdk-test-data
43+
ref: ${{ inputs.test_data_branch }}
44+
path: sdk-test-data
45+
2446
- run: npm ci
2547
- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
2648
# Add WASM target

0 commit comments

Comments
 (0)