From 00a25fd9ca934b5314598d5df4d491387d7d6868 Mon Sep 17 00:00:00 2001 From: Jinke Li Date: Tue, 28 Jun 2022 10:09:41 +0800 Subject: [PATCH] =?UTF-8?q?chore(ci):=20=E6=AF=8F=E6=AC=A1=20push=20?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=97=B6=E5=8F=96=E6=B6=88=E4=B8=8A=E4=B8=80?= =?UTF-8?q?=E6=AC=A1=E6=9C=AA=E6=89=A7=E8=A1=8C=E5=AE=8C=E7=9A=84=20CI,=20?= =?UTF-8?q?=E9=81=BF=E5=85=8D=E6=8E=92=E9=98=9F=20(#1497)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/lint.yml | 8 +++++++- .github/workflows/test.yml | 6 ++++++ packages/s2-core/__tests__/spreadsheet/scroll-spec.ts | 4 ++-- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 50e477864b..61e8df278a 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -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 }} @@ -27,7 +33,7 @@ jobs: - name: Build run: yarn build - + - name: Bundle size run: yarn bundle:size env: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b84ba9c5c7..ec441f44e7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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 }} diff --git a/packages/s2-core/__tests__/spreadsheet/scroll-spec.ts b/packages/s2-core/__tests__/spreadsheet/scroll-spec.ts index a11a0d8d61..a40ece9723 100644 --- a/packages/s2-core/__tests__/spreadsheet/scroll-spec.ts +++ b/packages/s2-core/__tests__/spreadsheet/scroll-spec.ts @@ -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) {