Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 28 additions & 2 deletions .github/workflows/aws-runner-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ on:
options:
- success
- failure
- cancellation
- startup-timeout
- maximum-duration

permissions:
Expand All @@ -33,6 +35,7 @@ jobs:
aws-region: ${{ vars.MICROVM_AWS_REGION }}
- uses: ./
id: start
continue-on-error: ${{ inputs.scenario == 'startup-timeout' }}
with:
mode: start
github-token: ${{ secrets.RUNNER_E2E_TOKEN }}
Expand All @@ -42,10 +45,29 @@ jobs:
cloudwatch-log-group: ${{ vars.MICROVM_RUNTIME_LOG_GROUP }}
runner-labels: lambda-microvm,docker,e2e
maximum-duration-seconds:
${{ inputs.scenario == 'maximum-duration' && '60' || '900' }}
${{ inputs.scenario == 'maximum-duration' && '60' || inputs.scenario
== 'cancellation' && '180' || '900' }}
startup-timeout-seconds:
${{ inputs.scenario == 'startup-timeout' && '45' || '180' }}
egress-connectors:
${{ inputs.scenario == 'startup-timeout' && '[]' ||
'INTERNET_EGRESS' }}
- name: Verify expected startup outcome
if: always()
env:
EXPECTED_FAILURE: ${{ inputs.scenario == 'startup-timeout' }}
START_OUTCOME: ${{ steps.start.outcome }}
run: |
if [[ "${EXPECTED_FAILURE}" == "true" ]]; then
test "${START_OUTCOME}" = "failure"
else
test "${START_OUTCOME}" = "success"
fi

target:
if: inputs.scenario != 'maximum-duration'
if:
inputs.scenario != 'maximum-duration' && inputs.scenario !=
'startup-timeout'
needs: start-runner
runs-on: ${{ needs.start-runner.outputs.label }}
timeout-minutes: 15
Expand Down Expand Up @@ -121,6 +143,10 @@ jobs:
if: inputs.scenario == 'failure'
run: exit 1

- name: Wait for cancellation
if: inputs.scenario == 'cancellation'
run: sleep 300

duration-audit:
if: inputs.scenario == 'maximum-duration'
needs: start-runner
Expand Down
8 changes: 5 additions & 3 deletions docs/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,12 @@ Every candidate version must prove in AWS:
The manual `.github/workflows/aws-runner-e2e.yml` workflow exercises the
production three-job pattern through the GitHub OIDC role. Set a temporary
`RUNNER_E2E_TOKEN` repository secret with Administration read/write permission,
then run its `success`, `failure`, and `maximum-duration` scenarios. Remove the
then run its `success`, `failure`, `startup-timeout`, and `maximum-duration`
scenarios. For `cancellation`, cancel the run while its target waits. Remove the
secret after testing. The workflow verifies checkout, the ARM64 host, Docker,
Buildx, Compose, service containers, DNS, egress, failure cleanup, idempotent
stop, and the platform duration backstop.
Buildx, Compose, service containers, DNS, egress, partial-start cleanup, job
failure and cancellation cleanup, idempotent stop, and the platform duration
backstop.

The lower-level `.github/workflows/aws-runner-target.yml` job remains available
for a runner launched outside GitHub Actions. It waits for a runner with the
Expand Down
Loading