Skip to content

Commit 581a79f

Browse files
Merge pull request #540 from lightpanda-io/make-e2e
make: add end2end target
2 parents cccb8e9 + 74fa9a6 commit 581a79f

File tree

3 files changed

+23
-16
lines changed

3 files changed

+23
-16
lines changed

.github/workflows/e2e-test.yml

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -127,21 +127,8 @@ jobs:
127127

128128
- run: chmod a+x ./lightpanda
129129

130-
- name: run puppeteer links
130+
- name: run end to end tests
131131
run: |
132132
./lightpanda serve & echo $! > LPD.pid
133-
node puppeteer/links.js || exit 1
133+
go run runner/main.go --verbose
134134
kill `cat LPD.pid`
135-
136-
- name: run puppeteer dump
137-
run: |
138-
./lightpanda serve & echo $! > LPD.pid
139-
node puppeteer/dump.js || exit 1
140-
kill `cat LPD.pid`
141-
142-
- name: run playwright connect
143-
run: |
144-
python3 -m http.server 1234 -d ./public & echo $! > PYTHON.pid
145-
./lightpanda serve & echo $! > LPD.pid
146-
node playwright/connect.js || exit 1
147-
kill `cat LPD.pid` `cat PYTHON.pid`

Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ help:
4848
# $(ZIG) commands
4949
# ------------
5050
.PHONY: build build-dev run run-release shell test bench download-zig wpt data get-v8 build-v8 build-v8-dev
51+
.PHONY: end2end
5152

5253
zig_version = $(shell grep 'recommended_zig_version = "' "vendor/zig-js-runtime/build.zig" | cut -d'"' -f2)
5354

@@ -94,6 +95,11 @@ wpt-summary:
9495
test:
9596
@TEST_FILTER='${F}' $(ZIG) build test -freference-trace --summary all
9697

98+
## Run demo/runner end to end tests
99+
end2end:
100+
@test -d ../demo
101+
cd ../demo && go run runner/main.go
102+
97103
## v8
98104
get-v8:
99105
@printf "\e[36mGetting v8 source...\e[0m\n"

README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ First, get the tools necessary for building V8, as well as the V8 source code:
229229
make get-v8
230230
```
231231

232-
Next, build v8. This build task is very long and cpu consuming, as you will build v8 from sources.
232+
Next, build v8. This build task is very long and cpu consuming, as you will build v8 from sources.
233233

234234
```
235235
make build-v8
@@ -243,6 +243,20 @@ For dev env, use `make build-v8-dev`.
243243

244244
You can test Lightpanda by running `make test`.
245245

246+
### End to end tests
247+
248+
To run end to end tests, you need to clone the [demo
249+
repository](https://github.com/lightpanda-io/demo) into `../demo` dir.
250+
251+
You have to install the [demo's node
252+
requirements](https://github.com/lightpanda-io/demo?tab=readme-ov-file#dependencies-1)
253+
254+
You also need to install [Go](https://go.dev) > v1.24.
255+
256+
```
257+
make end2end
258+
```
259+
246260
### Web Platform Tests
247261

248262
Lightpanda is tested against the standardized [Web Platform

0 commit comments

Comments
 (0)