Skip to content

Add workflow to check E2E tests pass before publishing#74

Closed
jovnc wants to merge 1 commit intogit-mastery:mainfrom
jovnc:chore/publish-on-e2e-success
Closed

Add workflow to check E2E tests pass before publishing#74
jovnc wants to merge 1 commit intogit-mastery:mainfrom
jovnc:chore/publish-on-e2e-success

Conversation

@jovnc
Copy link
Copy Markdown
Collaborator

@jovnc jovnc commented Mar 18, 2026

Summary

Fixes #66

  • Use gh runs list to check status of E2E tests
  • Ensure tests passes first before spinning up other workflows to publish

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 adds a gating job to the release/publish workflow so publishing only proceeds after the repository’s E2E test workflow has passed for the commit being released.

Changes:

  • Add a check-e2e job that queries GitHub Actions runs via gh run list and aborts if E2E did not succeed.
  • Update platform build jobs to require check-e2e (in addition to prepare) before they run.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +27 to +30
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh run list --repo ${{ github.repository }} --workflow test.yml --commit ${{ github.sha }} --status success --json conclusion --jq '.[0].conclusion' | grep -q success || (echo "E2E tests have not passed for commit ${{ github.sha }}. Publish aborted." && exit 1)
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh run list --repo ${{ github.repository }} --workflow test.yml --commit ${{ github.sha }} --status success --json conclusion --jq '.[0].conclusion' | grep -q success || (echo "E2E tests have not passed for commit ${{ github.sha }}. Publish aborted." && exit 1)
Comment on lines +24 to +30

steps:
- name: Check E2E test status for tagged commit
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh run list --repo ${{ github.repository }} --workflow test.yml --commit ${{ github.sha }} --status success --json conclusion --jq '.[0].conclusion' | grep -q success || (echo "E2E tests have not passed for commit ${{ github.sha }}. Publish aborted." && exit 1)
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh run list --repo ${{ github.repository }} --workflow test.yml --commit ${{ github.sha }} --status success --json conclusion --jq '.[0].conclusion' | grep -q success || (echo "E2E tests have not passed for commit ${{ github.sha }}. Publish aborted." && exit 1)
Comment on lines +21 to 38
check-e2e:
name: Verify E2E tests passed
runs-on: ubuntu-latest

steps:
- name: Check E2E test status for tagged commit
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh run list --repo ${{ github.repository }} --workflow test.yml --commit ${{ github.sha }} --status success --json conclusion --jq '.[0].conclusion' | grep -q success || (echo "E2E tests have not passed for commit ${{ github.sha }}. Publish aborted." && exit 1)

prepare:
uses: git-mastery/actions/.github/workflows/get-latest-tag.yml@main
secrets: inherit

linux-build:
needs: prepare
needs: [prepare, check-e2e]
if: needs.prepare.outputs.should_publish == 'true'
@jovnc jovnc closed this Mar 18, 2026
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.

Update pipeline to only perform publish workflow if E2E tests passes

2 participants