Repository navigation
CI Set COMMIT_MESSAGE to allow commit markers detection in unit-tests.yml - #32501
Conversation
7ef4425 to
bbb1cf3
Compare
COMMIT_MESSAGE envar to allow commit markers detection in unit-tests.ymlCOMMIT_MESSAGE to allow commit markers detection in unit-tests.yml
0cfb0f7 to
337f547
Compare
…github/workflows/unit-tests.yml`
337f547 to
d6b8053
Compare
d6b8053 to
019ffbc
Compare
lesteve
left a comment
There was a problem hiding this comment.
Definitely goes in the right direction and is not too complicated which is always nice.
To test this it would be good to:
- modify
test_script.shto add-vto the pytest command - push a commit with
[float32]in the commit message - make sure in the CI log that tests with global_dtype fixture are not skipped with float32 e.g.
sklearn/cluster/tests/test_affinity_propagation.pytest_affinity_propagation.
Other than this a few minor comments.
| outputs: | ||
| message: ${{ steps.git-log.outputs.message }} | ||
| steps: | ||
| - uses: actions/checkout@v5 |
There was a problem hiding this comment.
I would use the same pattern we use in wheels.yml since we know it works and I find it a bit simpler.
scikit-learn/.github/workflows/wheels.yml
Lines 35 to 39 in 90ef87a
The reason it works is likely than on a push this ${{ github.event.pull_request.head.sha }} is empty and that in this case, the default behaviour kicks in which does the right thing and checkout the branch.
b453ae8 to
d569aa6
Compare
|
@lesteve after downloading the logs of the commit 14b727f I can confirm that the |
|
Great, you can push a commit without |
14b727f to
ebefd0c
Compare
|
@lesteve after removing the |
|
Let me know when i can remove the last commit. |
|
Looks good thanks, feel free to revert the debug changes about |
This reverts commit ebefd0c.
| echo 'message<<EOF' | ||
| echo "${message}" | ||
| echo EOF | ||
| } >> "${GITHUB_OUTPUT}" |
There was a problem hiding this comment.
Actually very good catch this is something I was wondering about and then forgot: is multi-line variables allowed in GITHUB_OUTPUT?
My crude understanding was that it's one line per variable but this would need to be double-checked.
we don't really need multi-line comment for [float32] but we kind of do for [all global random seeds], since the current format is something like:
message [all random seeds]
test_first
test_second
Having said this, if it's too annoying to support we can decide to change the format.
There was a problem hiding this comment.
Following the documentation, multi-line variable is supported this way.
In addition, the marker is verified using the regex if [[ "$COMMIT_MESSAGE" =~ \[float32\] ]];, which is working on multi-line.
Also, you can see in the commit 6e361bc (https://github.com/scikit-learn/scikit-learn/actions/runs/18561787134/job/52912450590?pr=32501) with a float32 marker and a multi-line comment, that the marker is catched:
And the COMMIT_MESSAGE variable is well set:
There was a problem hiding this comment.
OK great, it seems like we are all good then!
This reverts commit 6e361bc.
Reference Issues/PRs
Partially addresses #32434.
What does this implement/fix? Explain your changes.
Retrieve and set the latest commit message as
COMMIT_MESSAGEenvironment variable in.github/workflows/unit-tests.ymlto allow commit markers detection inbuild_tools/azure/test_script.sh.