Skip to content

Commit

Permalink
gh/actions: run benchmark and NPM diff on correct base commits
Browse files Browse the repository at this point in the history
Fixes #3371
  • Loading branch information
IvanGoncharov committed Dec 15, 2021
1 parent 95a85f7 commit 7c74efa
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/ci.yml
Expand Up @@ -170,7 +170,7 @@ jobs:
- name: Checkout repo
uses: actions/checkout@v2
with:
fetch-depth: 2
fetch-depth: ${{ (github.event.pull_request.commits || 1) + 1 }}

- name: Setup Node.js
uses: actions/setup-node@v2
Expand All @@ -182,7 +182,9 @@ jobs:
run: npm ci --ignore-scripts

- name: Run Benchmark
run: 'npm run benchmark -- --revs HEAD HEAD~1'
run: 'npm run benchmark -- --revs HEAD $BASE_COMMIT'
env:
BASE_COMMIT: ${{ github.event.pull_request.base.sha || 'HEAD~1' }}

diff-npm-package:
name: Diff content of NPM package
Expand All @@ -191,7 +193,7 @@ jobs:
- name: Checkout repo
uses: actions/checkout@v2
with:
fetch-depth: 2
fetch-depth: ${{ (github.event.pull_request.commits || 1) + 1 }}

- name: Setup Node.js
uses: actions/setup-node@v2
Expand Down

0 comments on commit 7c74efa

Please sign in to comment.