Skip to content

Commit b361edb

Browse files
committed
Skip tests if there is no fix since last run
1 parent 4e177e1 commit b361edb

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

.github/workflows/check-new-library-versions-in-batch.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,26 @@ jobs:
8080
github-token: ${{ secrets.GITHUB_TOKEN }}
8181
native-image-job-reports: 'true'
8282

83+
- name: "Check for existing failure issue and skip if found"
84+
id: check_existing_issue
85+
run: |
86+
GROUP_ID="$(echo "${{ matrix.item.name }}" | cut -d: -f1)"
87+
ARTIFACT_ID="$(echo "${{ matrix.item.name }}" | cut -d: -f2)"
88+
89+
readarray -t VERSIONS < <(echo '${{ toJson(matrix.item.versions) }}' | jq -r '.[]')
90+
FIRST_TESTING_VERSION="${VERSIONS[0]}"
91+
92+
TITLE="Failure detected for $GROUP_ID:$ARTIFACT_ID"
93+
BODY="First failing version $GROUP_ID:$ARTIFACT_ID:$FIRST_TESTING_VERSION"
94+
95+
ISSUE_NUMBER=$(gh issue list --repo "${{ github.repository }}" --state open --search "$TITLE" --json number,title,body --jq \
96+
'.[] | select(.title == "'"$TITLE"'") | select(.body == "'"$BODY"'") | .number')
97+
98+
if [[ -n "$ISSUE_NUMBER" ]]; then
99+
echo "There is no progress since last time this version was tested. Skipping further steps."
100+
exit 0
101+
fi
102+
83103
- name: "Extract test path and library version"
84104
id: extract-params
85105
run: |

0 commit comments

Comments
 (0)