-
Notifications
You must be signed in to change notification settings - Fork 2
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
temp branch reference.
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.
Would a relative path work here and be more concise?
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
allows workflow to be triggered remotely via API
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would a relative path work here and be more concise?
@@ -0,0 +1,46 @@ | |||
name: 'Test SDK' |
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.
Should we rename this file? action.yml
feels kind of generic
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh right this is an action not a workflow, carry on
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.
π
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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-data
Description 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.