@@ -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
35-
36- - name : Run validation sequences
34+ ./validate | tee output.txt
35+
36+ - name : Run validation sequences for fitResults
37+ id : fitresults
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
42-
43- - name : Compare fitResults output with expected
44- run : |
45- diff analyses/cms-open-data-ttbar/output.txt .github/workflows/validation/fitResuts_1_file_validation_reference.yml
40+ if grep -q "Test failed: fitResults validation output does not match expected result." output.txt; then
41+ echo "fitResults validation failed."
42+ echo "RESULT_FITRESULTS=fail" >> $GITHUB_ENV
43+ else
44+ echo "fitResults validation passed."
45+ echo "RESULT_FITRESULTS=pass" >> $GITHUB_ENV
46+ fi
4647
4748 - name : FitResults validation
48- if : failure() # This step will be executed if the diff command finds differences
49+ if : env.RESULT_FITRESULTS == 'fail'
50+ continue-on-error : true
4951 run : |
5052 echo "Test failed: fitResults validation output does not match expected result."
51-
53+ exit 1
54+
5255 - name : Compare histograms validation output with expected
56+ id : histograms
5357 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+ cd analyses/cms-open-data-ttbar/
59+ if grep -q "Test failed: Histograms validation output does not match expected result." output.txt; then
60+ echo "Histograms validation failed."
61+ echo "RESULT_HISTOGRAMS=fail" >> $GITHUB_ENV
62+ else
63+ echo "Histograms validation passed."
64+ echo "RESULT_HISTOGRAMS=pass" >> $GITHUB_ENV
65+ fi
66+
67+ - name : Histograms validation
68+ if : env.RESULT_HISTOGRAMS == 'fail'
5869 run : |
5970 echo "Test failed: Histograms validation output does not match expected result."
71+ exit 1
0 commit comments