forked from iflytek/skillhub
-
Notifications
You must be signed in to change notification settings - Fork 6
89 lines (74 loc) · 2.11 KB
/
pr-e2e.yml
File metadata and controls
89 lines (74 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
79
80
81
82
83
84
85
86
87
88
89
name: PR E2E Tests
on:
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
paths:
- 'web/**'
- 'server/**'
- 'scripts/**'
- 'docker-compose.yml'
- 'docker-compose.staging.yml'
- 'Makefile'
- '.github/workflows/pr-e2e.yml'
workflow_dispatch:
concurrency:
group: pr-e2e-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
e2e-tests:
name: E2E (Real Services)
if: ${{ github.event_name != 'pull_request' || !github.event.pull_request.draft }}
runs-on: ubuntu-latest
timeout-minutes: 90
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
cache-dependency-path: web/pnpm-lock.yaml
- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
cache: maven
- name: Ensure Maven wrapper is executable
run: chmod +x server/mvnw
- name: Start full dev stack
run: make dev-all
- name: Install Playwright browsers
run: cd web && pnpm exec playwright install --with-deps chromium
- name: Run frontend E2E tests
run: make test-e2e-frontend
- name: Upload Playwright HTML report
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v4
with:
name: playwright-report
path: web/playwright-report/
if-no-files-found: warn
retention-days: 30
- name: Upload Playwright raw test results
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v4
with:
name: playwright-test-results
path: web/test-results/
if-no-files-found: warn
retention-days: 14
- name: Stop full dev stack
if: ${{ always() }}
run: make dev-all-down