Skip to content

Commit 9b09e96

Browse files
authored
quality: parameterize sdk and test data branches (#66)
* parameterize sdk and test data branches * drop gcloud
1 parent 06c4941 commit 9b09e96

File tree

1 file changed

+21
-3
lines changed

1 file changed

+21
-3
lines changed

.github/workflows/test.yml

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,41 @@
11
name: Test SDK
2+
3+
env:
4+
SDK_BRANCH_NAME: ${{ inputs.sdk_branch || github.head_ref || github.ref_name || 'main' }}
5+
TEST_DATA_BRANCH_NAME: ${{ inputs.test_data_branch || 'main' }}
6+
27
on:
38
pull_request:
49
paths:
510
- '**/*'
611
push:
712
branches:
813
- main
14+
workflow_dispatch:
915

16+
workflow_call:
17+
inputs:
18+
test_data_branch:
19+
type: string
20+
description: The branch in sdk-test-data to target for testcase files
21+
required: false
22+
default: main
23+
sdk_branch:
24+
type: string
25+
description: The branch of the SDK to test
26+
required: false
1027
jobs:
1128
test-sdk:
1229
runs-on: ubuntu-latest
1330
steps:
1431
- uses: actions/checkout@v3
32+
with:
33+
repository: Eppo-exp/golang-sdk
34+
ref: ${{ env.SDK_BRANCH_NAME}}
1535
- uses: actions/setup-go@v3
1636
with:
1737
go-version: 1.19
1838
- name: Build
1939
run: go build -v ./...
20-
- name: 'Set up GCP SDK for downloading test data'
21-
uses: 'google-github-actions/setup-gcloud@v0'
2240
- name: Test
23-
run: make test
41+
run: make test branchName=${{env.TEST_DATA_BRANCH_NAME}}

0 commit comments

Comments
 (0)