-
Notifications
You must be signed in to change notification settings - Fork 0
87 lines (73 loc) · 1.99 KB
/
e2e-tests.yml
File metadata and controls
87 lines (73 loc) · 1.99 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
79
80
81
82
83
84
85
86
87
name: E2E QA Validation
on:
push:
branches: [ main, develop, 'copilot/**' ]
pull_request:
branches: [ main, develop ]
workflow_dispatch: # Allow manual triggering
permissions:
contents: read
jobs:
e2e-tests:
name: End-to-End QA Validation
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
contents: read
steps:
- uses: actions/checkout@v4
# Set up Java for backend
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: 'gradle'
# Set up Node.js for frontend and tests
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'
cache-dependency-path: |
frontend/package-lock.json
e2e-tests/package-lock.json
# Grant execute permissions
- name: Grant execute permission for gradlew
run: chmod +x backend/gradlew
# Install frontend dependencies (required by E2E test)
- name: Install frontend dependencies
run: |
cd frontend
npm ci
# Install E2E test dependencies
- name: Install E2E test dependencies
run: |
cd e2e-tests
npm ci
# Install Playwright browsers
- name: Install Playwright Chromium
run: |
cd e2e-tests
npx playwright install chromium
# Run E2E tests
- name: Run E2E QA validation tests
run: |
cd e2e-tests
npm test
# Upload screenshots on failure or success
- name: Upload screenshots
if: always()
uses: actions/upload-artifact@v4
with:
name: e2e-screenshots
path: /tmp/qa-screenshot-*.png
if-no-files-found: warn
# Upload test logs on failure
- name: Upload logs on failure
if: failure()
uses: actions/upload-artifact@v4
with:
name: e2e-logs
path: e2e-tests/*.log
if-no-files-found: ignore