quality: parameterize branch names and extract test action#65
Conversation
fa7349e to
6263c23
Compare
6263c23 to
60bea96
Compare
| uses: 'google-github-actions/setup-gcloud@v0' | ||
| - name: "Run tests" | ||
| run: make test | ||
| - uses: Eppo-exp/python-sdk/.github/actions/action-test@tp/workflows/remote |
There was a problem hiding this comment.
temp branch reference.
There was a problem hiding this comment.
Would a relative path work here and be more concise?
There was a problem hiding this comment.
yes, yes it would, however, it requires an additional actions/checkout step to checkout the repo first, which is a step that needs to be done in the action, so it adds redundant work.
| pull_request: | ||
| paths: | ||
| - '**/*' | ||
| workflow_dispatch: |
There was a problem hiding this comment.
allows workflow to be triggered remotely via API
There was a problem hiding this comment.
I like the rename to be consistent with other SDKs as well 🧹
| run-tests-with-tox: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: "actions/checkout@v2" |
There was a problem hiding this comment.
extracted into a composite action. Keeps the main workflow file cleaner in exchange for some more boilerplate and yet another yaml file
| pull_request: | ||
| paths: | ||
| - '**/*' | ||
| workflow_dispatch: |
There was a problem hiding this comment.
I like the rename to be consistent with other SDKs as well 🧹
| uses: 'google-github-actions/setup-gcloud@v0' | ||
| - name: "Run tests" | ||
| run: make test | ||
| - uses: Eppo-exp/python-sdk/.github/actions/action-test@tp/workflows/remote |
There was a problem hiding this comment.
Would a relative path work here and be more concise?
| @@ -0,0 +1,46 @@ | |||
| name: 'Test SDK' | |||
There was a problem hiding this comment.
Should we rename this file? action.yml feels kind of generic
There was a problem hiding this comment.
I might have read the docs wrong, but as I understand it, github expects action.yml for your action magic. The naming is in its containing directory where common convention is to prefix with action-.
There was a problem hiding this comment.
oh right this is an action not a workflow, carry on
| uses: 'google-github-actions/setup-gcloud@v0' | ||
| - name: "Run tests" | ||
| run: make test | ||
| - uses: Eppo-exp/python-sdk/.github/actions/action-test@tp/workflows/remote |
There was a problem hiding this comment.
@typotter you seem to forgot removing temp branch reference before merging? ^
This broke PR testing: https://github.com/Eppo-exp/python-sdk/actions/runs/10634064395/job/29480558050?pr=68
|
Thanks Oleksii. On it.
…On Fri, Aug 30, 2024, 8:07 a.m. Oleksii Shmalko ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In .github/workflows/lint-test-sdk.yml
<#65 (comment)>:
> @@ -50,17 +51,6 @@ jobs:
run-tests-with-tox:
runs-on: ubuntu-latest
steps:
- - uses: ***@***.***"
- - uses: ***@***.***"
- 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: ***@***.***'
- - name: "Run tests"
- run: make test
+ - uses: ***@***.***/workflows/remote
@typotter <https://github.com/typotter> you seem to forgot removing temp
branch reference before merging? ^
This broke PR testing:
https://github.com/Eppo-exp/python-sdk/actions/runs/10634064395/job/29480558050?pr=68
—
Reply to this email directly, view it on GitHub
<#65 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACJ5TDNQ7QQ5NQLBVXX53J3ZUB4BTAVCNFSM6AAAAABM4KRGRKVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDENZSGQ3DQOJTHA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
🎟️ Fixes FF-3094 towards FF-3085
👯♂️ Related PRs
Motivation
Changes are often made to the sdk-test-data repository to capture new behaviours, bugs and edge cases. When these changes are pushed to
main, the SDKs are cloned locally (locally to the github action running) and their respective tests are run. These tests are set up and run by copies of the SDK test workflows - see sdk-test-data workflow. There are a number of limitations to this setup:sdk-test-dataDescription of Changes
This change
🚀 - The test job is extracted into a composite action, allowing it to be called from both the SDK's local workflow as well as from workflows in other repositories.
External to this Change
sdk-test-data get two testing workflows.