add e2e tests as gate in release workflow#127
add e2e tests as gate in release workflow#127Aaravanand00 wants to merge 1 commit intohyperledger-identus:mainfrom
Conversation
Signed-off-by: Aaravanand00 <aaravanand5749@gmail.com>
f9c14f3 to
896a34b
Compare
|
There was a problem hiding this comment.
Pull request overview
This PR updates the Release Integration GitHub Actions workflow to gate report generation on a newly added test job, with the intent of preventing report publication when tests fail.
Changes:
- Added a new
e2e-testsjob that installs dependencies and runs tests. - Updated
generate-reportsto depend one2e-tests. - Removed
if: always()fromgenerate-reportsso it only runs when dependencies succeed.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| generate-reports: | ||
| needs: [main, sdk-ts, sdk-kmp, sdk-swift] | ||
| if: always() | ||
| needs: [main, sdk-ts, sdk-kmp, sdk-swift, e2e-tests] |
There was a problem hiding this comment.
generate-reports will now be skipped whenever any job in needs is skipped (e.g., sdk-kmp is currently if: false, and other SDK jobs can be skipped when their if: condition is false). This means the release workflow may never generate reports even when everything relevant succeeded.
To keep reports gated on success while still tolerating intentionally skipped jobs, reintroduce an explicit job-level if: that allows execution when upstream jobs are success or skipped, and additionally requires needs.e2e-tests.result == 'success' (and needs.main.result == 'success'). Alternatively, remove permanently-disabled jobs from needs so they can’t block report generation.
| needs: [main, sdk-ts, sdk-kmp, sdk-swift, e2e-tests] | |
| needs: [main, sdk-ts, sdk-kmp, sdk-swift, e2e-tests] | |
| if: ${{ needs.main.result == 'success' && needs.e2e-tests.result == 'success' && contains(fromJson('["success","skipped"]'), needs.sdk-ts.result) && contains(fromJson('["success","skipped"]'), needs.sdk-kmp.result) && contains(fromJson('["success","skipped"]'), needs.sdk-swift.result) }} |
| - name: Run E2E tests | ||
| # TODO: replace with actual E2E command if different | ||
| run: npm test | ||
|
|
There was a problem hiding this comment.
This job is labeled "E2E Tests" but runs npm test, which maps to vitest run in this repo’s package.json (unit tests), not the SDK integration E2E suite. If the goal is to gate the release on real E2E/integration tests, switch this step to the appropriate command (or call into the existing integration runner); otherwise, rename the job/step to avoid implying E2E coverage.



Summary
This adds a small change to make sure E2E tests pass before the release workflow continues.
What changed
e2e-testsjobgenerate-reportsdepend on itif: always()so it only runs on successWhy
In this repo, the release step is basically the report generation and update of the integration status.
With this change, those steps will only run if the E2E tests pass, so we don’t publish results from a failing state.
Notes
npm test(can be updated if there’s a dedicated E2E command later)