Skip to content

Commit fd4cc8a

Browse files
authored
quality: Round 2 of SDK test workflow migrations (#58)
1 parent 174d768 commit fd4cc8a

File tree

2 files changed

+27
-99
lines changed

2 files changed

+27
-99
lines changed

.github/workflows/test-sdks-remote.yml

Lines changed: 14 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -7,64 +7,34 @@ on:
77
workflow_dispatch:
88

99
jobs:
10-
11-
test-php-sdk:
12-
runs-on: ubuntu-latest
13-
steps:
14-
- name: Display workflow details
15-
shell: bash
16-
run: |
17-
echo "Testing eppo-exp/php-sdk"
18-
- name: Run remote workflow
19-
uses: convictional/[email protected]
20-
with:
21-
owner: Eppo-exp
22-
repo: php-sdk
23-
workflow_file_name: run-tests.yml
24-
ref: main
25-
github_token: ${{ secrets.AUTH_TOKEN }}
26-
wait_interval: 10
27-
propagate_failure: true
28-
trigger_workflow: true
29-
wait_workflow: true
3010

31-
test-node-server-sdk:
11+
test-sdks:
3212
runs-on: ubuntu-latest
13+
strategy:
14+
matrix:
15+
sdk:
16+
- { repo: "java-server-sdk", workflow: "lint-test-sdk.yml", ref: "main" }
17+
- { repo: "php-sdk", workflow: "run-tests.yml", ref: "main" }
18+
- { repo: "js-client-sdk", workflow: "lint-test-sdk.yml", ref: "main" }
19+
- { repo: "python-sdk", workflow: "lint-test-sdk.yml", ref: "main" }
20+
- { repo: "node-server-sdk", workflow: "lint-test-sdk.yml", ref: "main" }
21+
- { repo: "dot-net-server-sdk", workflow: "run-tests.yml", ref: "main" }
3322
steps:
3423
- name: Display workflow details
3524
shell: bash
3625
run: |
37-
echo "Testing eppo-exp/node-server-sdk"
26+
echo "Testing eppo-exp/${{ matrix.sdk.repo }}"
3827
- name: Run remote workflow
3928
uses: convictional/[email protected]
4029
with:
4130
owner: Eppo-exp
42-
repo: node-server-sdk
43-
workflow_file_name: lint-test-sdk.yml
44-
ref: main
31+
repo: ${{ matrix.sdk.repo }}
32+
workflow_file_name: ${{ matrix.sdk.workflow }}
33+
ref: ${{ matrix.sdk.ref }}
4534
github_token: ${{ secrets.AUTH_TOKEN }}
4635
wait_interval: 10
4736
propagate_failure: true
4837
trigger_workflow: true
4938
wait_workflow: true
5039

51-
test-dotnet-sdk:
52-
runs-on: ubuntu-latest
53-
steps:
54-
- name: Display workflow details
55-
shell: bash
56-
run: |
57-
echo "Testing Eppo-exp/dot-net-server-sdk"
58-
- name: Run remote workflow
59-
uses: convictional/[email protected]
60-
with:
61-
owner: Eppo-exp
62-
repo: dot-net-server-sdk
63-
workflow_file_name: run-tests.yml
64-
ref: main
65-
github_token: ${{ secrets.AUTH_TOKEN }}
66-
wait_interval: 10
67-
propagate_failure: true
68-
trigger_workflow: true
69-
wait_workflow: true
7040

.github/workflows/test-sdks.yml

Lines changed: 13 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,10 @@ on:
99
jobs:
1010

1111
test-java-sdk:
12-
runs-on: macos-latest
13-
steps:
14-
- name: Check out Java SDK
15-
uses: actions/checkout@v3
16-
with:
17-
repository: 'Eppo-exp/java-server-sdk'
18-
- name: Set up JDK 11
19-
uses: actions/setup-java@v3
20-
with:
21-
java-version: '11'
22-
distribution: 'adopt'
23-
- name: 'Set up GCP SDK'
24-
uses: 'google-github-actions/setup-gcloud@v0'
25-
- name: Run tests
26-
run: make test
12+
uses: Eppo-exp/java-server-sdk/.github/workflows/lint-test-sdk.yml@main
13+
with:
14+
test_data_branch: ${{ github.head_ref || github.ref_name }}
15+
sdk_branch: main
2716

2817
test-android-sdk:
2918
runs-on: macos-latest
@@ -87,29 +76,11 @@ jobs:
8776
sdk_branch: main
8877

8978
test-node-client-sdk:
90-
runs-on: ubuntu-latest
91-
steps:
92-
- name: Check out node client SDK
93-
uses: actions/checkout@v3
94-
with:
95-
repository: 'Eppo-exp/js-client-sdk'
96-
- name: Use Node.js 18
97-
uses: actions/setup-node@v1
98-
with:
99-
node-version: '18.x'
100-
- uses: actions/cache@v2
101-
with:
102-
path: './node_modules'
103-
key: ${{ runner.os }}-root-node-modules-${{ hashFiles('./yarn.lock') }}
104-
- name: 'Set up GCP SDK for downloading test data'
105-
uses: 'google-github-actions/setup-gcloud@v0'
106-
- name: Install SDK dependencies
107-
run: yarn --frozen-lockfile
108-
working-directory: ./
109-
- name: Run tests
110-
run: yarn test
111-
working-directory: ./
112-
79+
uses: Eppo-exp/js-client-sdk/.github/workflows/lint-test-sdk.yml@main
80+
with:
81+
test_data_branch: ${{ github.head_ref || github.ref_name }}
82+
sdk_branch: main
83+
11384
test-react-native-sdk:
11485
runs-on: ubuntu-latest
11586
steps:
@@ -127,24 +98,11 @@ jobs:
12798
test-python-sdk:
12899
runs-on: ubuntu-latest
129100
steps:
130-
- name: 'Check out Python SDK'
131-
uses: "actions/checkout@v3"
101+
- name: "Run test action"
102+
uses: 'Eppo-exp/python-sdk/.github/actions/action-test@main'
132103
with:
133-
repository: 'Eppo-exp/python-sdk'
134-
- name: Install Python 3.9
135-
uses: "actions/setup-python@v2"
136-
with:
137-
python-version: '3.9.x'
138-
- name: "Install dependencies"
139-
run: |
140-
python -VV
141-
python -m pip install --upgrade pip setuptools wheel
142-
python -m pip install -r requirements.txt
143-
python -m pip install -r requirements-test.txt
144-
- name: 'Set up GCP SDK to download test data'
145-
uses: 'google-github-actions/setup-gcloud@v0'
146-
- name: Run tests
147-
run: make test
104+
test_data_branch: ${{ github.head_ref || github.ref_name }}
105+
sdk_branch: main
148106

149107
test-php-sdk:
150108
uses: Eppo-exp/php-sdk/.github/workflows/run-tests.yml@main

0 commit comments

Comments
 (0)