diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b7b05d3..f1ed501 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,4 +1,9 @@ name: Test SDK + +env: + SDK_BRANCH_NAME: ${{ inputs.sdk_branch || github.head_ref || github.ref_name || 'main' }} + TEST_DATA_BRANCH_NAME: ${{ inputs.test_data_branch || 'main' }} + on: pull_request: paths: @@ -6,18 +11,31 @@ on: push: branches: - main + workflow_dispatch: + workflow_call: + inputs: + test_data_branch: + type: string + description: The branch in sdk-test-data to target for testcase files + required: false + default: main + sdk_branch: + type: string + description: The branch of the SDK to test + required: false jobs: test-sdk: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + with: + repository: Eppo-exp/golang-sdk + ref: ${{ env.SDK_BRANCH_NAME}} - uses: actions/setup-go@v3 with: go-version: 1.19 - name: Build run: go build -v ./... - - name: 'Set up GCP SDK for downloading test data' - uses: 'google-github-actions/setup-gcloud@v0' - name: Test - run: make test + run: make test branchName=${{env.TEST_DATA_BRANCH_NAME}}