-
Notifications
You must be signed in to change notification settings - Fork 43
59 lines (51 loc) · 1.65 KB
/
e2e-docs-tests.yml
File metadata and controls
59 lines (51 loc) · 1.65 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
name: E2E Docs Tests
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
permissions:
contents: read
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Setup Node.js (needed for integrated frontend build in dotnet build)
- uses: voidzero-dev/setup-vp@v1
# Setup .NET and build backend (triggers frontend build automatically)
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: "10.0.x"
- name: Build backend
run: dotnet build src/Ivy.Docs/Ivy.Docs.csproj
- name: Start backend server
run: |
dotnet run --project src/Ivy.Docs/Ivy.Docs.csproj -- --port 5010 --silent &
echo $! > backend.pid
# Wait for server to be ready
timeout 30 bash -c 'until curl -f http://localhost:5010/ > /dev/null 2>&1; do sleep 1; done'
- name: Install Playwright Browsers
working-directory: ./src/frontend
run: npx playwright install --with-deps
- name: Run Playwright tests for Docs
working-directory: ./src/frontend
run: npm run e2e:docs
env:
PLAYWRIGHT_BASE_URL: http://localhost:5010
# Cleanup backend server
- name: Stop backend server
if: always()
run: |
if [ -f backend.pid ]; then
kill $(cat backend.pid) || true
rm backend.pid
fi
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-report-docs
path: src/frontend/playwright-report/
retention-days: 30