Skip to content

Commit acbfb9e

Browse files
authored
test: split browser tests into its own job, fix logs path (#975)
1 parent a725d12 commit acbfb9e

1 file changed

Lines changed: 27 additions & 2 deletions

File tree

.github/workflows/e2e-tests-full.yml

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,31 @@ jobs:
7979
GEMINI_API_KEY: ${{ env.E2E_GEMINI_API_KEY }}
8080
CDK_TARBALL: ${{ env.CDK_TARBALL }}
8181
run: npm run test:e2e
82+
browser-tests:
83+
runs-on: ubuntu-latest
84+
environment: e2e-testing
85+
timeout-minutes: 30
86+
steps:
87+
- uses: actions/checkout@v6
88+
with:
89+
ref: ${{ github.event_name == 'workflow_dispatch' && github.ref || 'main' }}
90+
- uses: actions/setup-node@v6
91+
with:
92+
node-version: '20.x'
93+
cache: 'npm'
94+
- uses: astral-sh/setup-uv@v7
95+
- name: Configure AWS credentials
96+
uses: aws-actions/configure-aws-credentials@v6
97+
with:
98+
role-to-assume: ${{ secrets.E2E_AWS_ROLE_ARN }}
99+
aws-region: ${{ inputs.aws_region || 'us-east-1' }}
100+
- name: Get AWS Account ID
101+
id: aws
102+
run: echo "account_id=$(aws sts get-caller-identity --query Account --output text)" >> "$GITHUB_OUTPUT"
103+
- run: npm ci
104+
- run: npm run build
105+
- name: Install CLI globally
106+
run: npm install -g "$(npm pack | tail -1)"
82107
- name: Install Playwright browsers
83108
run: npx playwright install chromium --with-deps
84109
- name: Run browser tests
@@ -91,7 +116,7 @@ jobs:
91116
if: failure()
92117
run: |
93118
echo "=== Dev server PTY output ==="
94-
cat test-results/agentcore-dev-pty.log 2>/dev/null || echo "(no pty log)"
119+
cat browser-tests/test-results/agentcore-dev-pty.log 2>/dev/null || echo "(no pty log)"
95120
echo ""
96121
echo "=== Error contexts ==="
97-
find test-results -name 'error-context.md' -exec echo "--- {} ---" \; -exec cat {} \; 2>/dev/null || echo "(no error contexts)"
122+
find browser-tests/test-results -name 'error-context.md' -exec echo "--- {} ---" \; -exec cat {} \; 2>/dev/null || echo "(no error contexts)"

0 commit comments

Comments
 (0)