Skip to content

Commit

Permalink
Merge 10ebb1e into 17ee23f
Browse files Browse the repository at this point in the history
  • Loading branch information
segayuu committed Jul 11, 2020
2 parents 17ee23f + 10ebb1e commit 6669d92
Show file tree
Hide file tree
Showing 5 changed files with 91 additions and 67 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/benchmark.yml
@@ -0,0 +1,36 @@
name: Benchmark

on:
push:
branchs: [ master ]
pull_request:

jobs:
benchmark:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
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-${{ runner.OS }}-${{ matrix.node-version }}.txt
- uses: actions/upload-artifact@v2
with:
name: benchmark-results
path: benchmark-result-${{ runner.OS }}-${{ matrix.node-version }}.txt
4 changes: 2 additions & 2 deletions .github/workflows/linter.yml
Expand Up @@ -6,13 +6,13 @@ jobs:
linter:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
- name: Use Node.js 12.x
uses: actions/setup-node@v1
with:
node-version: '12.x'
- name: Cache NPM dependencies
uses: actions/cache@v1
uses: actions/cache@v2
with:
path: node_modules
key: ${{ runner.OS }}-npm-cache
Expand Down
53 changes: 53 additions & 0 deletions .github/workflows/profiling.yml
@@ -0,0 +1,53 @@
name: profiling

on:
push:
branchs: [ master ]
pull_request:

jobs:
profiling:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ['10.x', '12.x', '14.x']
fail-fast: false
steps:
- name: Set up dummy Hexo site
uses: actions/checkout@v2
with:
repository: hexojs/hexo-theme-unit-test
path: hexo-theme-unit-test
- name: Install hexo-theme-landscape
uses: actions/checkout@v2
with:
repository: hexojs/hexo-theme-landscape
path: hexo-theme-unit-test/hexo-theme-landscape
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: npm install
run: npm install --silent
working-directory: hexo-theme-unit-test
- name: Cache NPM dependencies
uses: actions/cache@v1
with:
path: hexo-theme-unit-test/node_modules
key: ${{ runner.OS }}-profiling-npm-cache
restore-keys: ${{ runner.OS }}-profiling-npm-cache
- name: Replace node_modules/hexo
run: |
rm -rf node_modules/hexo
ln -sf $GITHUB_WORKSPACE node_modules/hexo
working-directory: hexo-theme-unit-test
- name: Start test run
run: npx --no-install hexo clean
working-directory: hexo-theme-unit-test
- name: Generating flamegraph
run: npx 0x --name ${{ matrix.node-version }} --output-dir "${GITHUB_WORKSPACE}/0x" -- npx --no-install hexo g;
working-directory: hexo-theme-unit-test
- uses: actions/upload-artifact@v2
with:
name: profiling-results
path: ${{ github.workspace }}/0x
27 changes: 0 additions & 27 deletions .travis.yml

This file was deleted.

38 changes: 0 additions & 38 deletions test/profiling.sh

This file was deleted.

0 comments on commit 6669d92

Please sign in to comment.