-
Notifications
You must be signed in to change notification settings - Fork 117
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
Testing new way to specify azure tests #20060
Changes from 13 commits
c2b3203
baee914
c90ff40
96a0915
48b790d
d3835b0
a673153
c585716
23255fe
337f833
cbe3cc0
5a3dcf0
0c0d2e7
83c500c
144393b
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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Update PRCI checksum | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
compute-prci-checksum: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
|
||
- name: Compute checksum | ||
run: | | ||
cd src/test | ||
|
||
# Compute the checksum of all prci .py source code | ||
cksum=$(find tests -name '*.py' -exec grep -H -m 1 CLASSES {} \; | grep prci | cut -d':' -f1 | sort | xargs -n 1 cat | shasum -a 256 | cut -d' ' -f1) | ||
|
||
# Update checksum in prci_checksum.txt | ||
sed -i -e '/^# Checksum:/{' -e 'n' -e "s/.*/$cksum/" -e '}' prci_checksum.txt | ||
|
||
- name: Commit and push changes | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "GitHub Action" | ||
git add -A | ||
git commit -m "Update prci checksum" || echo "No changes to commit" | ||
git push |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# This file holds a checksum of all the .py source code that is run | ||
# during pull request CI. That is, any .py source file which includes | ||
# the 'prci' string in the 'CLASSES' entry in the header of the file. | ||
# | ||
# This file is then used by Azure CI as one of the paths it checks to | ||
# decide if it needs to trigger a new main build and run of tests. | ||
# | ||
# The string 'prci' stands for Pull Request Continuous Integration. | ||
# | ||
# To include any .py test script in pull request CI, just add the | ||
# 'prci' string to the 'CLASSES' entry in the header of the file. | ||
# | ||
# New tests should be added only if they meet the following conditions... | ||
# | ||
# 1) The test typically takes less than 20 seconds to run "normally". | ||
# 2) The test uses only Silo or Blueprint data or no data at all. | ||
# 3) The test tests something significantly different from all the | ||
# other .py files already included in prci. | ||
# | ||
# The command to produce the checksum is... | ||
# | ||
# find . -name '*.py' -exec grep -H -m 1 CLASSES {} \; | grep prci | \ | ||
# cut -d':' -f1 | sort | xargs -n 1 cat | shasum -a 256 | ||
# | ||
# A GitHub Action maintains this checksum automatically. | ||
# | ||
# Because GitHub Actions and Azure CI are completely asyncronous to | ||
# each other, its possible an Azure CI run can begin before the action | ||
# that updates this checksum has completed. But, because any commit/push | ||
# to a PR will cancel existing Azure runs and start new ones, this is ok. | ||
# | ||
# Checksum: | ||
c5d80acd8b84f8924d62b6c84084c632bcc82e31796bc25c238e63bc8e89556b |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
This directory maintains a "list" of those .py files we run | ||
Pull Request CI on (via Azure). That "list" is implemented | ||
as a bunch of symlinks from this dir to various .py files | ||
we want to be executed during Pull Request CI. | ||
|
||
DO NOT ADD .py FILES HERE. | ||
|
||
Add only links to existing .py files in other parts of | ||
src/test/tests dir tree here and so so only under the | ||
following conditions... | ||
|
||
1) The test typically takes less than 20 seconds to run | ||
"normally" (e.g. on nightly testing). | ||
2) The test uses only Silo or Blueprint data or no data | ||
at all. | ||
3) The test tests something significantly different from | ||
all the other .py files already linked here. | ||
|
||
If all of the above conditions are met, the adding a symlink | ||
here to the associated .py file will have the effect of adding | ||
it to the collection of tests performed during Pull Request CI. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../unit/annotation_objects.py |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../unit/atts_assign.py |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../databases/blueprint.py |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../databases/blueprint_export.py |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../unit/convert2to3.py |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../hybrid/ddf.py |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../unit/default_methods.py |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../expressions/ghost_zoneid_expr.py |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../expressions/global_stats.py |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../expressions/math_expr.py |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../unit/protocol.py |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../databases/silo.py |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../expressions/tensor_expr.py |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../unit/test_value_simple.py |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../unit/utility.py |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# ---------------------------------------------------------------------------- | ||
# CLASSES: nightly | ||
# CLASSES: nightly, prci | ||
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. Your first condition for PRCI tests isn't true for blueprint: 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 condition is about adding new tests...not about anything preexisting this work. 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 see |
||
# | ||
# Test Case: blueprint.py | ||
# | ||
|
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 am not familiar enough with all of these commands to know exactly what is happening... if someone names a variable in a python test
prci
will the test get unwittingly triggered in CI?