Skip to content

Commit

Permalink
chore(ci): 每次 push 代码时取消上一次未执行完的 CI, 避免排队 (#1497)
Browse files Browse the repository at this point in the history
  • Loading branch information
lijinke666 authored Jun 28, 2022
1 parent 93c7c7b commit 00a25fd
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ jobs:
node-version: [16]

steps:
# 每次 push 代码时取消上一次的 CI, 避免排队
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@main
with:
access_token: ${{ github.token }}

- uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node-version }}
Expand All @@ -27,7 +33,7 @@ jobs:

- name: Build
run: yarn build

- name: Bundle size
run: yarn bundle:size
env:
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ jobs:
node-version: [16]

steps:
# 每次 push 代码时取消上一次的 CI, 避免排队
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@main
with:
access_token: ${{ github.token }}

- uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node-version }}
Expand Down
4 changes: 2 additions & 2 deletions packages/s2-core/__tests__/spreadsheet/scroll-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,8 @@ describe('Scroll Tests', () => {
await sleep(200);

// emit event
expect(onScroll).toHaveBeenCalledWith(offset);
expect(onDeprecatedLayoutCellScroll).toHaveBeenCalledWith(offset);
expect(onScroll).toHaveBeenCalled();
expect(onDeprecatedLayoutCellScroll).toHaveBeenCalled();
expect(onRowScroll).not.toHaveBeenCalled();

if (frozenRowHeader) {
Expand Down

0 comments on commit 00a25fd

Please sign in to comment.