Skip to content

Commit 26afbdf

Browse files
committed
Fix regression tests coming back from the dead.
If it had been more than 15 runs (approx 15 days) since the last succesful baseline reference job, then all regression tests would fail. Furthermore, even the baseline reference job, would fail, making it impossible to get started again. Now, it checks the last 60 runs instead of the last 15, and it doesn't bother checking if you're running a reference job - so we should be able to resume even if there are no succesful results in the past.
1 parent 2b0610a commit 26afbdf

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

.github/workflows/CI.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,13 +239,14 @@ jobs:
239239

240240
# Retrieve Stable Results for reference
241241
- name: Find ID of Reference Results
242+
if: ${{ env.REFERENCE_JOB == 'false' }}
242243
env:
243244
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
244245
# this will search for the last successful execution of CI on main
245246
run: |
246-
run_id=$(gh run list -R ReactionMechanismGenerator/RMG-Py --workflow="Continuous Integration" --branch main --limit 15 --json databaseId,conclusion --jq 'map(select(.conclusion == "success")) | .[0].databaseId')
247+
run_id=$(gh run list -R ReactionMechanismGenerator/RMG-Py --workflow="Continuous Integration" --branch main --limit 60 --json databaseId,conclusion --jq 'map(select(.conclusion == "success")) | .[0].databaseId')
247248
if [ -z "$run_id" ] || [ "$run_id" = "null" ]; then
248-
echo "::error::No successful reference run found"
249+
echo "::error::No successful reference run found in last 60 runs."
249250
exit 1
250251
fi
251252
echo "CI_RUN_ID=$run_id" >> $GITHUB_ENV

0 commit comments

Comments
 (0)