-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
quality: Round 2 of SDK test workflow migrations #58
Changes from 28 commits
4a04a35
4287cf3
6c45973
874666d
329d1c3
b953942
9c0b22f
814d43e
9956312
ce829b1
fa12480
a4568fd
a782469
d2f80cf
b00dd2d
6b51782
ec1482f
f54ef48
9a2f434
2f98040
b2f80fb
bcdbb1d
6dc088c
44eca8a
ae7a3f8
ae56e90
e4149d3
8cec2c7
6a7a010
b8ca3a3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,9 +4,30 @@ on: | |
push: | ||
branches: | ||
- main | ||
- tp/workflows/round2 | ||
workflow_dispatch: | ||
|
||
jobs: | ||
|
||
test-java-sdk: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. lots of duplicated code, have you considered using a matrix? Unchecked example from ChatGPT: test-sdks:
runs-on: ubuntu-latest
strategy:
matrix:
sdk:
- { repo: "java-server-sdk", workflow: "lint-test-sdk.yml", ref: "tp/workflows/remote" }
- { repo: "php-sdk", workflow: "run-tests.yml", ref: "main" }
- { repo: "js-client-sdk", workflow: "lint-test-sdk.yml", ref: "tp/workflows/remote" }
- { repo: "python-sdk", workflow: "lint-test-sdk.yml", ref: "tp/workflows/remote" }
steps:
- name: Display workflow details
shell: bash
run: |
echo "Testing eppo-exp/${{ matrix.sdk.repo }}"
- name: Run remote workflow
uses: convictional/[email protected]
with:
owner: Eppo-exp
repo: ${{ matrix.sdk.repo }}
workflow_file_name: ${{ matrix.sdk.workflow }}
ref: ${{ matrix.sdk.ref }}
github_token: ${{ secrets.AUTH_TOKEN }}
wait_interval: 10
propagate_failure: true
trigger_workflow: true
wait_workflow: true There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I hadn't, in fact. 🧑🍳 |
||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Display workflow details | ||
shell: bash | ||
run: | | ||
echo "Testing Eppo-exp/java-server-sdk" | ||
- name: Run remote workflow | ||
uses: convictional/[email protected] | ||
with: | ||
owner: Eppo-exp | ||
repo: java-server-sdk | ||
workflow_file_name: lint-test-sdk.yml | ||
ref: tp/workflows/remote | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you merge these first I imagine you won't need this There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. that's right; will remove these refs after SDK PRs are merged |
||
github_token: ${{ secrets.AUTH_TOKEN }} | ||
wait_interval: 10 | ||
propagate_failure: true | ||
trigger_workflow: true | ||
wait_workflow: true | ||
|
||
test-php-sdk: | ||
runs-on: ubuntu-latest | ||
|
@@ -28,6 +49,46 @@ jobs: | |
trigger_workflow: true | ||
wait_workflow: true | ||
|
||
test-node-client-sdk: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Display workflow details | ||
shell: bash | ||
run: | | ||
echo "Testing eppo-exp/js-client-sdk" | ||
- name: Run remote workflow | ||
uses: convictional/[email protected] | ||
with: | ||
owner: Eppo-exp | ||
repo: js-client-sdk | ||
workflow_file_name: lint-test-sdk.yml | ||
ref: tp/workflows/remote | ||
github_token: ${{ secrets.AUTH_TOKEN }} | ||
wait_interval: 10 | ||
propagate_failure: true | ||
trigger_workflow: true | ||
wait_workflow: true | ||
|
||
test-python-sdk: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Display workflow details | ||
shell: bash | ||
run: | | ||
echo "Testing eppo-exp/python-sdk" | ||
- name: Run remote workflow | ||
uses: convictional/[email protected] | ||
with: | ||
owner: Eppo-exp | ||
repo: python-sdk | ||
workflow_file_name: lint-test-sdk.yml | ||
ref: tp/workflows/remote | ||
github_token: ${{ secrets.AUTH_TOKEN }} | ||
wait_interval: 10 | ||
propagate_failure: true | ||
trigger_workflow: true | ||
wait_workflow: true | ||
|
||
test-node-server-sdk: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,21 +9,10 @@ on: | |
jobs: | ||
|
||
test-java-sdk: | ||
runs-on: macos-latest | ||
steps: | ||
- name: Check out Java SDK | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: 'Eppo-exp/java-server-sdk' | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '11' | ||
distribution: 'adopt' | ||
- name: 'Set up GCP SDK' | ||
uses: 'google-github-actions/setup-gcloud@v0' | ||
- name: Run tests | ||
run: make test | ||
uses: Eppo-exp/java-server-sdk/.github/workflows/lint-test-sdk.yml@tp/workflows/remote | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is the eventual plan to remove this file and just use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the remote workflow is to trigger the tests to run in the respective SDK repos, effectively turning them red when the test data causes a test failure. The |
||
with: | ||
test_data_branch: ${{ github.head_ref || github.ref_name }} | ||
sdk_branch: main | ||
|
||
test-android-sdk: | ||
runs-on: macos-latest | ||
|
@@ -87,29 +76,11 @@ jobs: | |
sdk_branch: main | ||
|
||
test-node-client-sdk: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out node client SDK | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: 'Eppo-exp/js-client-sdk' | ||
- name: Use Node.js 18 | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: '18.x' | ||
- uses: actions/cache@v2 | ||
with: | ||
path: './node_modules' | ||
key: ${{ runner.os }}-root-node-modules-${{ hashFiles('./yarn.lock') }} | ||
- name: 'Set up GCP SDK for downloading test data' | ||
uses: 'google-github-actions/setup-gcloud@v0' | ||
- name: Install SDK dependencies | ||
run: yarn --frozen-lockfile | ||
working-directory: ./ | ||
- name: Run tests | ||
run: yarn test | ||
working-directory: ./ | ||
|
||
uses: Eppo-exp/js-client-sdk/.github/workflows/lint-test-sdk.yml@tp/workflows/remote | ||
with: | ||
test_data_branch: ${{ github.head_ref || github.ref_name }} | ||
sdk_branch: main | ||
|
||
test-react-native-sdk: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
@@ -127,24 +98,11 @@ jobs: | |
test-python-sdk: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 'Check out Python SDK' | ||
uses: "actions/checkout@v3" | ||
- name: "Run test action" | ||
uses: 'Eppo-exp/python-sdk/.github/actions/action-test@tp/workflows/remote' | ||
with: | ||
repository: 'Eppo-exp/python-sdk' | ||
- name: Install Python 3.9 | ||
uses: "actions/setup-python@v2" | ||
with: | ||
python-version: '3.9.x' | ||
- name: "Install dependencies" | ||
run: | | ||
python -VV | ||
python -m pip install --upgrade pip setuptools wheel | ||
python -m pip install -r requirements.txt | ||
python -m pip install -r requirements-test.txt | ||
- name: 'Set up GCP SDK to download test data' | ||
uses: 'google-github-actions/setup-gcloud@v0' | ||
- name: Run tests | ||
run: make test | ||
test_data_branch: ${{ github.head_ref || github.ref_name }} | ||
sdk_branch: main | ||
|
||
test-php-sdk: | ||
uses: Eppo-exp/php-sdk/.github/workflows/run-tests.yml@main | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
temporary I'm guessing?
What about running these shared tests on all pull requests, like we do for the individual SDKs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test-sdks.yml
is for in-flight changes; we don't want to make the SDKs in their respective repos until the test cases are checked in.Temporary indeed; removed.