Skip to content

Commit

Permalink
feat: Allow testing workflow to be reused and provide target branch f…
Browse files Browse the repository at this point in the history
…or test data.
  • Loading branch information
typotter authored Dec 3, 2024
1 parent 0d44751 commit 691f7ac
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down

0 comments on commit 691f7ac

Please sign in to comment.