Skip to content

Commit

Permalink
ci: return typecheck step (#6334)
Browse files Browse the repository at this point in the history
  • Loading branch information
sheremet-va committed Sep 12, 2024
1 parent a14e009 commit 5612c28
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 5 deletions.
21 changes: 20 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
run: pnpm run lint

changed:
runs-on: macos-14
runs-on: ubuntu-latest
outputs:
should_skip: ${{ steps.changed-files.outputs.only_changed == 'true' }}

Expand All @@ -50,6 +50,25 @@ jobs:
!.github/workflows/ci.yml
**.md
typecheck:
needs: changed
if: needs.changed.outputs.should_skip != 'true'
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: ./.github/actions/setup-and-cache

- name: Install
run: pnpm i

- name: Build
run: pnpm run build

- name: Typecheck
run: pnpm run typecheck

test:
needs: changed
if: needs.changed.outputs.should_skip != 'true'
Expand Down
4 changes: 2 additions & 2 deletions packages/browser/src/client/tester/unhandled.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ function catchWindowErrors(cb: (e: ErrorEvent) => void) {
const removeEventListener = window.removeEventListener.bind(window)
window.addEventListener('error', throwUnhandlerError)
window.addEventListener = function (
...args: Parameters<typeof addEventListener>
...args: [any, any, any]
) {
if (args[0] === 'error') {
userErrorListenerCount++
}
return addEventListener.apply(this, args)
}
window.removeEventListener = function (
...args: Parameters<typeof removeEventListener>
...args: [any, any, any]
) {
if (args[0] === 'error' && userErrorListenerCount) {
userErrorListenerCount--
Expand Down
4 changes: 2 additions & 2 deletions packages/vitest/src/integrations/env/jsdom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ function catchWindowErrors(window: Window) {
const removeEventListener = window.removeEventListener.bind(window)
window.addEventListener('error', throwUnhandlerError)
window.addEventListener = function (
...args: Parameters<typeof addEventListener>
...args: [any, any, any]
) {
if (args[0] === 'error') {
userErrorListenerCount++
}
return addEventListener.apply(this, args)
}
window.removeEventListener = function (
...args: Parameters<typeof removeEventListener>
...args: [any, any, any]
) {
if (args[0] === 'error' && userErrorListenerCount) {
userErrorListenerCount--
Expand Down

0 comments on commit 5612c28

Please sign in to comment.