mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-29 15:13:28 +00:00
ci: add puppeteer regression test
This commit is contained in:
32
.github/workflows/zig-test.yml
vendored
32
.github/workflows/zig-test.yml
vendored
@@ -69,9 +69,6 @@ jobs:
|
|||||||
zig-build-release:
|
zig-build-release:
|
||||||
name: zig build release
|
name: zig build release
|
||||||
|
|
||||||
# Don't run the CI on PR
|
|
||||||
if: github.event_name != 'pull_request'
|
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
@@ -86,6 +83,14 @@ jobs:
|
|||||||
- name: zig build release
|
- name: zig build release
|
||||||
run: zig build -Doptimize=ReleaseSafe -Dengine=v8
|
run: zig build -Doptimize=ReleaseSafe -Dengine=v8
|
||||||
|
|
||||||
|
- name: upload artifact
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: lightpanda-build-release
|
||||||
|
path: |
|
||||||
|
zig-out/bin/lightpanda
|
||||||
|
retention-days: 1
|
||||||
|
|
||||||
zig-test:
|
zig-test:
|
||||||
name: zig test
|
name: zig test
|
||||||
|
|
||||||
@@ -146,6 +151,10 @@ jobs:
|
|||||||
name: demo-puppeteer
|
name: demo-puppeteer
|
||||||
needs: zig-build-dev
|
needs: zig-build-dev
|
||||||
|
|
||||||
|
env:
|
||||||
|
MAX_MEMORY: 23456
|
||||||
|
MAX_AVG_DURATION: 22
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
@@ -159,12 +168,21 @@ jobs:
|
|||||||
- name: download artifact
|
- name: download artifact
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: lightpanda-build-dev
|
name: lightpanda-build-release
|
||||||
|
|
||||||
- run: chmod a+x ./lightpanda
|
- run: chmod a+x ./lightpanda
|
||||||
|
|
||||||
- name: run puppeteer
|
- name: run puppeteer
|
||||||
run: |
|
run: |
|
||||||
python3 -m http.server 1234 -d ./public &
|
go run ws/main.go &
|
||||||
./lightpanda &
|
/usr/bin/time -f'%M' -omrs.out ./lightpanda &
|
||||||
RUNS=2 npm run bench-puppeteer-cdp
|
RUNS=100 npm run bench-puppeteer-cdp |tee output
|
||||||
|
|
||||||
|
- name: memory regression
|
||||||
|
run: |
|
||||||
|
test "`cat mrs.out`" -le "$MAX_MEMORY"
|
||||||
|
|
||||||
|
- name: duration regression
|
||||||
|
run: |
|
||||||
|
test "`cat output|grep 'avg run'|sed 's/avg run duration (ms) //'`" -le "$MAX_AVG_DURATION"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user