Compare commits

...

3 Commits

Author SHA1 Message Date
Volodymyr Zotov
d403a29fdc Update documentation 2025-10-02 15:34:51 -05:00
Volodymyr Zotov
d30ed0b9d7 Name the jobs 'run-e2e-tests' 2025-10-02 15:31:23 -05:00
Volodymyr Zotov
db2053fde4 Update status for e2e-test check as well 2025-10-02 15:28:48 -05:00
3 changed files with 23 additions and 13 deletions

View File

@@ -13,7 +13,7 @@ concurrency:
cancel-in-progress: true # cancel previous job runs for the same branch
jobs:
e2e-tests:
run-e2e-tests:
uses: ./.github/workflows/e2e-tests.yml
if: |
github.event_name == 'repository_dispatch' &&
@@ -28,15 +28,14 @@ jobs:
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
update-check-status:
needs: e2e-tests
needs: run-e2e-tests
runs-on: ubuntu-latest
if: always() && github.event_name == 'repository_dispatch'
steps:
- uses: actions/github-script@v6
env:
ref: ${{ github.event.client_payload.pull_request.head.sha }}
conclusion: ${{ needs.e2e-tests.result }}
job: check-external-pr
conclusion: ${{ needs.run-e2e-tests.result }}
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
@@ -45,7 +44,8 @@ jobs:
ref: process.env.ref
});
const check = checks.check_runs.filter(c => c.name === process.env.job);
// update the 'check-external-pr' check run
const check = checks.check_runs.filter(c => c.name === 'check-external-pr');
const { data: result } = await github.rest.checks.update({
...context.repo,
@@ -54,4 +54,14 @@ jobs:
conclusion: process.env.conclusion
});
return result;
// update the 'run-e2e-tests' check run from 'test-e2e.yml' workflow
const check = checks.check_runs.filter(c => c.name === 'run-e2e-tests');
const { data: result } = await github.rest.checks.update({
...context.repo,
check_run_id: check[0].id,
status: 'completed',
conclusion: process.env.conclusion
});
return null;

View File

@@ -33,7 +33,7 @@ jobs:
fi
echo "✅ Internal PR detected. Proceeding with tests."
e2e-test:
run-e2e-tests:
needs: check-external-pr
if: always() && (needs.check-external-pr.result == 'success' || github.event_name != 'pull_request')
uses: ./.github/workflows/e2e-tests.yml

View File

@@ -6,7 +6,7 @@ This document explains how to test external pull requests using the dispatch act
The testing system consists of three main workflows:
1. **E2E Tests [triggered by maintainer]** (`test-e2e.yml`) - Runs automatically for internal PRs, requires approval for external PRs
1. **E2E Tests** (`test-e2e.yml`) - Runs automatically for internal PRs, requires approval for external PRs
2. **Ok To Test** (`ok-to-test.yml`) - Processes slash commands to trigger fork testing
3. **E2E tests [fork]** (`test-e2e-fork.yml`) - Triggered manually via slash commands for external PRs
@@ -53,18 +53,18 @@ Once the initial checks have run (and failed), maintainers can test the PR using
4. **Workflow Execution**
The fork workflow runs two jobs:
**a) `e2e-tests` job** (conditional)
**a) `run-e2e-tests` job** (conditional)
- Only runs if:
- Event is `repository_dispatch`
- SHA parameter is not empty
- PR head SHA contains the provided SHA
- Calls the reusable `e2e-tests.yml` workflow
- Calls the reusable `run-e2e-tests.yml` workflow
- Runs the actual E2E tests if conditions are met
**b) `update-check-status` job** (conditional)
- Runs after `e2e-tests` completes
- Updates the existing check for job named "e2e-tests"
- Sets the conclusion based on `e2e-tests` result:
- Updates the existing check for job named "run-e2e-tests" from 'test-e2e.yml' workflow
- Sets the conclusion based on `run-e2e-tests` result:
- ✅ **Success** if tests pass
- ❌ **Failure** if tests fail
@@ -96,7 +96,7 @@ Once the initial checks have run (and failed), maintainers can test the PR using
## Workflow Files
- **`.github/workflows/ok-to-test.yml`** - Ok To Test - Slash command processor
- **`.github/workflows/test-e2e.yml`** - E2E Tests [triggered by maintainer] - Initial PR checks
- **`.github/workflows/test-e2e.yml`** - E2E Tests - Initial PR checks
- **`.github/workflows/test-e2e-fork.yml`** - E2E tests [fork] - Dispatch action handler
- **`.github/workflows/e2e-tests.yml`** - E2E Tests [reusable] - Reusable workflow for actual testing