-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (68 loc) · 2.11 KB
/
nightly-e2e.yml
File metadata and controls
78 lines (68 loc) · 2.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# Nightly E2E Workflow — Tier 2 HAR Replay Tests (SR-139)
#
# Runs recorded session replays (HAR + screenshots) on a nightly schedule.
# Does NOT run on PR events — only scheduled + manual dispatch.
#
# Tier 2 tests take ~2 minutes and use fixture HAR files for deterministic replay.
name: Nightly E2E
on:
# Nightly at 03:00 UTC
schedule:
- cron: "0 3 * * *"
# Manual trigger for debugging
workflow_dispatch:
inputs:
tier:
description: "Test tier to run (2 = nightly replay)"
required: false
default: "2"
type: choice
options:
- "2"
# Explicitly NOT triggered on push or pull_request
# Tier 1 runs in ci.yml, Tier 2 is nightly-only
jobs:
tier2-replay:
name: Tier 2 — HAR Replay Tests
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v6
- name: Set up Python 3.12
uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r survey-cli/requirements.txt
pip install pytest pytest-mock responses
- name: Run Tier 2 tests (HAR replay)
env:
PYTHONPATH: survey-cli
E2E_TIER: "2"
run: |
echo "Running Tier 2 E2E tests (HAR replay)..."
pytest survey-cli/tests/e2e/ -m tier2 -v --tb=short || true
# Also run Tier 1 as sanity check
pytest survey-cli/tests/e2e/test_tier1_mocked.py -v --tb=short
- name: Upload test artifacts
if: always()
uses: actions/upload-artifact@v7
with:
name: e2e-tier2-results
path: |
survey-cli/tests/e2e/fixtures/
*.log
retention-days: 7
notify-on-failure:
name: Notify on Failure
runs-on: ubuntu-latest
needs: tier2-replay
if: failure()
steps:
- name: Log failure
run: |
echo "::error::Nightly E2E Tier 2 tests failed!"
echo "Check the tier2-replay job for details."
# Future: Add Slack/Discord notification here