-
Notifications
You must be signed in to change notification settings - Fork 1
78 lines (66 loc) · 2.05 KB
/
local.yml
File metadata and controls
78 lines (66 loc) · 2.05 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
name: Local E2E Tests
on:
push:
branches: [main]
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
PLAYWRIGHT_BROWSERS_PATH: 0
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
core:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/setup
- name: Setup Playwright
uses: ./.github/actions/setup-playwright
- name: Build OpenNext packages
shell: bash
run: pnpm --filter @opennextjs/aws... run build
- name: Build examples apps with local configuration
shell: bash
run: pnpm -r openbuild:local
# Remember to add more ports here if we add new examples app
- name: Start the local OpenNext servers
shell: bash
run: |
pnpm -r openbuild:local:start &
for port in 3001 3002 3003; do
echo "Checking port $port..."
for attempt in {1..20}; do
sleep 0.5
if curl --silent --fail http://localhost:$port > /dev/null; then
echo "Server on $port is ready"
break
fi
if [ $attempt -eq 20 ]; then
echo "Server on $port failed to start"
exit 1
fi
echo "Waiting for server on $port, attempt $attempt..."
done
done
- name: Run E2E Test locally
shell: bash
run: |
pnpm e2e:test
cloudflare:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/setup
- name: Setup Playwright
uses: ./.github/actions/setup-playwright
- name: Build OpenNext packages
shell: bash
run: pnpm --filter @opennextjs/cloudflare run build
- name: Build worker with local configuration
shell: bash
run: pnpm turbo build:worker:cf
- name: Run E2E Test in Cloudflare Environment
shell: bash
run: pnpm turbo e2e:cf