Skip to content

Merge pull request #1807 from fullsend-ai/agent/852-add-consumer-comp… #1380

Merge pull request #1807 from fullsend-ai/agent/852-add-consumer-comp…

Merge pull request #1807 from fullsend-ai/agent/852-add-consumer-comp… #1380

Workflow file for this run

name: E2E Tests
permissions:
contents: read
id-token: write
on:
push:
branches: [main]
paths:
- '**/*.go'
- 'go.mod'
- 'go.sum'
- 'e2e/**'
- 'internal/scaffold/fullsend-repo/**'
- 'internal/security/hooks/**'
- 'internal/dispatch/gcf/mintsrc/**'
- 'internal/sentencetoken/english.json'
- 'Makefile'
- '.github/workflows/e2e.yml'
pull_request:
paths:
- '**/*.go'
- 'go.mod'
- 'go.sum'
- 'e2e/**'
- 'internal/scaffold/fullsend-repo/**'
- 'internal/security/hooks/**'
- 'internal/dispatch/gcf/mintsrc/**'
- 'internal/sentencetoken/english.json'
- 'Makefile'
- '.github/workflows/e2e.yml'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
e2e:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Install Playwright system dependencies
run: npx playwright install-deps chromium
- name: Check for secrets
id: secrets-check
run: |
if [ -z "$E2E_GITHUB_SESSION_B64" ]; then
echo "::warning::E2E secrets are not available (expected for fork PRs). Skipping e2e tests."
echo "available=false" >> "$GITHUB_OUTPUT"
else
echo "available=true" >> "$GITHUB_OUTPUT"
fi
env:
E2E_GITHUB_SESSION_B64: ${{ secrets.E2E_GITHUB_SESSION }}
- name: Decode session
if: steps.secrets-check.outputs.available == 'true'
run: |
SESSION_FILE="${RUNNER_TEMP}/github-session.json"
printf '%s' "$E2E_GITHUB_SESSION_B64" | base64 -d > "$SESSION_FILE"
echo "E2E_GITHUB_SESSION_FILE=${SESSION_FILE}" >> "$GITHUB_ENV"
env:
E2E_GITHUB_SESSION_B64: ${{ secrets.E2E_GITHUB_SESSION }}
- name: Authenticate to GCP
if: steps.secrets-check.outputs.available == 'true'
uses: google-github-actions/auth@v2
with:
workload_identity_provider: ${{ secrets.E2E_GCP_WIF_PROVIDER }}
service_account: ${{ secrets.E2E_GCP_SERVICE_ACCOUNT }}
- name: Run e2e tests
if: steps.secrets-check.outputs.available == 'true'
run: make e2e-test
env:
E2E_SCREENSHOT_DIR: ${{ runner.temp }}/e2e-screenshots
E2E_GITHUB_PASSWORD: ${{ secrets.E2E_GITHUB_PASSWORD }}
E2E_GITHUB_TOTP_SECRET: ${{ secrets.E2E_GITHUB_TOTP_SECRET }}
E2E_MINT_URL: ${{ secrets.E2E_MINT_URL }}
E2E_GCP_PROJECT_ID: ${{ secrets.E2E_GCP_PROJECT_ID }}
- name: Upload debug screenshots
if: always() && steps.secrets-check.outputs.available == 'true'
uses: actions/upload-artifact@v4
with:
name: e2e-screenshots
path: ${{ runner.temp }}/e2e-screenshots/
if-no-files-found: ignore
retention-days: 5