Skip to content

add e2e tests as gate in release workflow#127

Open
Aaravanand00 wants to merge 1 commit intohyperledger-identus:mainfrom
Aaravanand00:feat/e2e-quality-gate
Open

add e2e tests as gate in release workflow#127
Aaravanand00 wants to merge 1 commit intohyperledger-identus:mainfrom
Aaravanand00:feat/e2e-quality-gate

Conversation

@Aaravanand00
Copy link
Copy Markdown

Summary

This adds a small change to make sure E2E tests pass before the release workflow continues.

What changed

  1. added an e2e-tests job
  2. made generate-reports depend on it
  3. removed if: always() so it only runs on success

Why

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

  1. currently uses npm test (can be updated if there’s a dedicated E2E command later)
  2. kept the change minimal and limited to the release workflow

Copilot AI review requested due to automatic review settings April 22, 2026 09:59
Signed-off-by: Aaravanand00 <aaravanand5749@gmail.com>
@Aaravanand00 Aaravanand00 force-pushed the feat/e2e-quality-gate branch from f9c14f3 to 896a34b Compare April 22, 2026 10:01
@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-tests job that installs dependencies and runs tests.
  • Updated generate-reports to depend on e2e-tests.
  • Removed if: always() from generate-reports so 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]
Copy link

Copilot AI Apr 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
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) }}

Copilot uses AI. Check for mistakes.
Comment on lines +152 to +155
- name: Run E2E tests
# TODO: replace with actual E2E command if different
run: npm test

Copy link

Copilot AI Apr 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants