forked from krausest/js-framework-benchmark
-
Notifications
You must be signed in to change notification settings - Fork 3
72 lines (60 loc) · 1.67 KB
/
benchmark.yml
File metadata and controls
72 lines (60 loc) · 1.67 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
name: Benchmark
on: [pull_request]
jobs:
benchmark:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: nanasess/setup-chromedriver@master
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- uses: actions-rs/install@v0.1
with:
crate: wasm-bindgen-cli
version: latest
use-tool-cache: true
- uses: actions-rs/install@v0.1
with:
crate: wasm-pack
version: latest
use-tool-cache: true
- uses: actions-rs/install@v0.1
with:
crate: https
version: latest
use-tool-cache: true
- name: Server
run: http -p 8080 &
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: 12
- name: Npm Install
run: |
npm install
(cd webdriver-ts && npm install)
(cd webdriver-ts-results && npm install)
- name: Build
run: |
npm run build-prod
(cd webdriver-ts && npm run build-prod)
- name: Benchmark
run: npm run bench -- --headless
- name: Results
run: npm run results
- name: Build comment message
run: |
msg=$(cd results_diff && cargo run)
msg="${msg//'%'/'%25'}"
msg="${msg//$'\n'/'%0A'}"
msg="${msg//$'\r'/'%0D'}"
echo "::set-env name=MSG::$msg"
- name: Comment PR
uses: unsplash/comment-on-pr@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
msg: "${{ env.MSG }}"
check_for_duplicate_msg: false