diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 50233aa5..3edb1da5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,9 +5,21 @@ on: branches: - main pull_request: + workflow_call: + inputs: + test_data_branch: + type: string + description: The branch in sdk-test-data to target for testcase files + required: false + sdk_branch: + type: string + description: The branch of the SDK to test + required: false env: CARGO_TERM_COLOR: always + SDK_BRANCH: ${{ inputs.sdk_branch || github.ref || 'main' }} + TEST_DATA_BRANCH: ${{ inputs.test_data_branch || 'main' }} jobs: cargo_build_and_test: @@ -20,7 +32,17 @@ jobs: steps: - uses: actions/checkout@v4 with: - submodules: true + submodules: ${{ !inputs.test_data_branch }} + repository: Eppo-exp/eppo-multiplatform + ref: ${{ env.SDK_BRANCH }} + + - uses: actions/checkout@v4 + if: ${{ inputs.test_data_branch }} + with: + repository: Eppo-exp/sdk-test-data + ref: ${{ inputs.test_data_branch }} + path: sdk-test-data + - run: npm ci - run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }} # Add WASM target