99 - main
1010
1111jobs :
12- run-pyroot :
12+ run-cms-open-data-ttbar-analysis :
1313 runs-on : ubuntu-latest
1414
1515 steps :
@@ -31,29 +31,41 @@ jobs:
3131 run : |
3232 source root/bin/thisroot.sh
3333 cd analyses/cms-open-data-ttbar/
34- python analysis.py --n-max-files-per-sample 1 --remote-data-prefix='root://eospublic.cern.ch//eos/root-eos/AGC' --validation 1
34+ ./validate | tee output.txt
3535
36- - name : Run validation sequences
36+ - name : Compare histograms validation output with expected
37+ id : histograms
3738 run : |
38- source root/bin/thisroot.sh
3939 cd analyses/cms-open-data-ttbar/
40- python validate_histograms.py --histos histograms.root --reference reference/histos_1_file_per_process.json > output_histograms.txt
41- python reference/fitResults/validate_fit_result.py > output.txt
40+ if grep -q "Test failed: Histograms validation output does not match expected result." output.txt; then
41+ echo "Histograms validation failed."
42+ echo "RESULT_HISTOGRAMS=fail" >> $GITHUB_ENV
43+ else
44+ echo "Histograms validation passed."
45+ echo "RESULT_HISTOGRAMS=pass" >> $GITHUB_ENV
46+ fi
4247
43- - name : Compare fitResults output with expected
48+ - name : Histograms validation
49+ if : env.RESULT_HISTOGRAMS == 'fail'
50+ run : |
51+ echo "Test failed: Histograms validation output does not match expected result."
52+ exit 1
53+
54+ - name : Run validation sequences for fitResults
55+ id : fitresults
4456 run : |
45- diff analyses/cms-open-data-ttbar/output.txt .github/workflows/validation/fitResuts_1_file_validation_reference.yml
57+ cd analyses/cms-open-data-ttbar/
58+ if grep -q "Test failed: fitResults validation output does not match expected result." output.txt; then
59+ echo "fitResults validation failed."
60+ echo "RESULT_FITRESULTS=fail" >> $GITHUB_ENV
61+ else
62+ echo "fitResults validation passed."
63+ echo "RESULT_FITRESULTS=pass" >> $GITHUB_ENV
64+ fi
4665
4766 - name : FitResults validation
48- if : failure() # This step will be executed if the diff command finds differences
67+ if : env.RESULT_FITRESULTS == 'fail'
4968 run : |
5069 echo "Test failed: fitResults validation output does not match expected result."
51-
52- - name : Compare histograms validation output with expected
53- run : |
54- diff analyses/cms-open-data-ttbar/output_histograms.txt .github/workflows/validation/histograms_1_file_validation_reference.yml
55-
56- - name : Histograms validationw
57- if : failure() # This step will be executed if the diff command finds differences
58- run : |
59- echo "Test failed: Histograms validation output does not match expected result."
70+ exit 1
71+
0 commit comments