Skip to content

Commit 290ee84

Browse files
committed
Fix workflow-tests: decouple backend tests from Selenium; add canary issues
Add if: always() to "Run backend workflow tests" so the 36 backend tests run unconditionally — previously they were silently skipped whenever Selenium (AddingST/EditingST/MigrationST) failed. Add a "Create canary issue on failure" step using actions/github-script@v7 that opens a GitHub Issue with a direct link to the failed run and the triggering build run ID. Add issues: write to the permissions block, which is required by the issue creation API call.
1 parent 8445345 commit 290ee84

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

.github/workflows/integration-workflow-tests.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88
permissions:
99
contents: read
1010
actions: read # needed to download artifacts from the triggering workflow run
11+
issues: write # needed to create canary issues on failure
1112

1213
jobs:
1314
workflow-tests:
@@ -101,10 +102,30 @@ jobs:
101102
-Dfailsafe.failIfNoSpecifiedTests=false
102103
103104
- name: Run backend workflow tests
105+
if: always()
104106
working-directory: kitodo-production
105107
run: |
106108
mvn verify -P'!development' -B \
107109
-Dtest='*Workflow*' \
108110
-Dit.test='*Workflow*,ConverterIT,ReaderIT,UpdaterIT' \
109111
-Dsurefire.failIfNoSpecifiedTests=false \
110112
-Dfailsafe.failIfNoSpecifiedTests=false
113+
114+
- name: Create canary issue on failure
115+
if: failure()
116+
uses: actions/github-script@v7
117+
with:
118+
script: |
119+
await github.rest.issues.create({
120+
owner: context.repo.owner,
121+
repo: context.repo.repo,
122+
title: `CI failure: workflow-tests failed on ${context.sha.slice(0, 7)}`,
123+
body: [
124+
'## Workflow tests failed',
125+
'',
126+
`**Run:** ${context.serverUrl}/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}`,
127+
`**Commit:** ${context.sha}`,
128+
`**Triggered by build run:** ${{ github.event.workflow_run.id }}`,
129+
].join('\n'),
130+
labels: ['ci-canary'],
131+
})

0 commit comments

Comments
 (0)