Skip to content

Commit 6f2185a

Browse files
committed
Run performance tests on all PR against base branch
Based on #1629 This PR proposes two things: 1. To run performance tests in CI for all PR 2. Run performance tests against the base branch (and not against the last RxPlayer release)
1 parent 10e5a82 commit 6f2185a

File tree

7 files changed

+657
-430
lines changed

7 files changed

+657
-430
lines changed

.github/workflows/perfs.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
name: Performance tests
22
on:
33
pull_request:
4-
types: [labeled]
4+
types: [opened, synchronize, reopened]
55

66
jobs:
77
perf-tests:
8-
if: ${{ github.event.label.name == 'Performance checks' }}
98
runs-on: [ubuntu-latest]
109
steps:
1110
- uses: actions/checkout@v2
@@ -21,4 +20,6 @@ jobs:
2120
- run: npm ci
2221
- run: export DISPLAY=:99
2322
- run: sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & # optional
24-
- run: node tests/performance/run.mjs
23+
- run:
24+
node tests/performance/run.mjs -b $GITHUB_BASE_REF -u
25+
https://github.com/canalplus/rx-player.git

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
/demo/worker.js
88

99
/tests/performance/node_modules
10-
/tests/performance/bundle1.js
11-
/tests/performance/bundle2.js
10+
/tests/performance/previous.js
11+
/tests/performance/current.js
1212
/tests/performance/package.json
1313
/tests/performance/package-lock.json
1414

tests/performance/index1.html renamed to tests/performance/current.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta charset="UTF-8" />
55
<meta name="viewport" content="width=device-width,initial-scale=1" />
6-
<script type="text/javascript" src="./bundle1.js" charset="utf-8"></script>
6+
<script type="text/javascript" src="./current.js" charset="utf-8"></script>
77
<title>RxPlayer - Performance tests</title>
88
</head>
99
<body>

tests/performance/index2.html renamed to tests/performance/previous.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta charset="UTF-8" />
55
<meta name="viewport" content="width=device-width,initial-scale=1" />
6-
<script type="text/javascript" src="./bundle2.js" charset="utf-8"></script>
6+
<script type="text/javascript" src="./previous.js" charset="utf-8"></script>
77
<title>RxPlayer - Performance tests</title>
88
</head>
99
<body>

0 commit comments

Comments
 (0)