-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
35 lines (33 loc) · 1 KB
/
benchmark.yml
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
name: Benchmark
on:
push:
branchs: [ master ]
pull_request:
jobs:
benchmark:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ['10.x', '12.x', '14.x']
fail-fast: false
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Cache NPM dependencies
uses: actions/cache@v1
with:
path: node_modules
key: ${{ runner.OS }}-npm-cache
restore-keys: |
${{ runner.OS }}-npm-cache
- name: Running benchmark
run: |
echo "============== Hexo Benchmark ==============" > benchmark-result-${{ matrix.node-version }}.txt
node test/benchmark.js >> benchmark-result-${{ matrix.node-version }}.txt
- uses: actions/upload-artifact@v2
with:
name: benchmark-results
path: benchmark-result-${{ matrix.node-version }}.txt