Skip to content

Commit d445b68

Browse files
authored
merge(hexojs#4535): from hexojs/actions-flamegraph
2 parents b69e685 + c7c3db2 commit d445b68

File tree

2 files changed

+30
-23
lines changed

2 files changed

+30
-23
lines changed

.github/workflows/benchmark.yml

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
strategy:
1717
matrix:
1818
os: [ubuntu-latest]
19-
node-version: ['10.x', '12.x', '14.x']
19+
node-version: ['10', '12', '14']
2020
fail-fast: false
2121
steps:
2222
- uses: actions/checkout@v2
@@ -33,3 +33,32 @@ jobs:
3333
run: npm install --silent
3434
- name: Running benchmark
3535
run: node test/benchmark.js --benchmark
36+
profiling:
37+
runs-on: ${{ matrix.os }}
38+
strategy:
39+
matrix:
40+
os: [ubuntu-latest]
41+
node-version: ['10', '12', '14']
42+
fail-fast: false
43+
steps:
44+
- uses: actions/checkout@v2
45+
- name: Use Node.js ${{ matrix.node-version }}
46+
uses: actions/setup-node@v1
47+
with:
48+
node-version: ${{ matrix.node-version }}
49+
- name: Cache NPM dependencies
50+
uses: actions/cache@v2
51+
with:
52+
path: node_modules
53+
key: ${{ runner.OS }}-${{ matrix.node-version }}-npm-cache
54+
- name: Install dependencies
55+
run: npm install --silent
56+
- name: Running profiling
57+
run: node test/benchmark.js --profiling
58+
- name: Publish flamegraph to https://${{ github.sha }}-${{ matrix.node-version }}-hexo.surge.sh/flamegraph.html
59+
uses: dswistowski/surge-sh-action@v1
60+
with:
61+
domain: ${{ github.sha }}-${{ matrix.node-version }}-hexo.surge.sh
62+
project: ./.tmp-hexo-theme-unit-test/0x/
63+
login: ${{ secrets.SURGE_LOGIN }}
64+
token: ${{ secrets.SURGE_TOKEN }}

.travis.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)