Skip to content

Commit 5bfa44b

Browse files
Merge pull request #497 from lightpanda-io/upgrade-jsruntime
ci: add a browser fetch test
2 parents 95cae6e + f6f83e2 commit 5bfa44b

File tree

4 files changed

+23
-4
lines changed

4 files changed

+23
-4
lines changed

.github/workflows/wpt.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ jobs:
4141
wpt:
4242
name: web platform tests
4343

44-
# Don't run the CI with draft PR.
45-
if: github.event.pull_request.draft == false
44+
# Only for PR without draft.
45+
if: github.event_name == 'pull_request' && github.event.pull_request.draft == false
4646

4747
runs-on: ubuntu-latest
4848

.github/workflows/zig-test.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,25 @@ jobs:
6666
zig-out/bin/lightpanda
6767
retention-days: 1
6868

69+
browser-fetch:
70+
name: browser fetch
71+
needs: zig-build-dev
72+
73+
# Don't run the CI with draft PR.
74+
if: github.event.pull_request.draft == false
75+
76+
runs-on: ubuntu-latest
77+
78+
steps:
79+
- name: download artifact
80+
uses: actions/download-artifact@v4
81+
with:
82+
name: lightpanda-build-dev
83+
84+
- run: chmod a+x ./lightpanda
85+
86+
- run: ./lightpanda fetch https://httpbin.io/xhr/get
87+
6988
zig-test:
7089
name: zig test
7190

src/main.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ pub fn main() !void {
5252
const alloc = if (builtin.mode == .Debug) gpa.allocator() else std.heap.c_allocator;
5353

5454
defer if (builtin.mode == .Debug) {
55-
_ = gpa.detectLeaks();
55+
if (gpa.detectLeaks()) std.posix.exit(1);
5656
};
5757

5858
var args_arena = std.heap.ArenaAllocator.init(alloc);

0 commit comments

Comments
 (0)