ci: fail when Jest detects open handles #3300
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: PostHog Watcher enqueue | |
| on: | |
| issues: | |
| types: [opened, reopened, edited] | |
| issue_comment: | |
| types: [created] | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| pull_request_review: | |
| types: [submitted] | |
| pull_request_review_comment: | |
| types: [created] | |
| permissions: | |
| contents: write # write queue.json to the state branch | |
| issues: read | |
| pull-requests: read | |
| actions: write # dispatch the drain workflow immediately after enqueueing | |
| concurrency: | |
| group: posthog-watcher-enqueue-${{ github.repository }}-${{ github.event.issue.number || github.event.pull_request.number || github.run_id }} | |
| cancel-in-progress: false | |
| jobs: | |
| enqueue: | |
| if: >- | |
| ${{ | |
| github.event_name == 'issues' || | |
| (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@posthog-watcher')) || | |
| ( | |
| github.event.pull_request.head.repo.full_name == github.repository && | |
| startsWith(github.event.pull_request.head.ref, 'posthog-watcher/') && | |
| (github.event_name != 'pull_request_review' || github.event.review.state == 'commented' || github.event.review.state == 'changes_requested') | |
| ) | |
| }} | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Enqueue watcher event | |
| uses: PostHog/posthog-watcher-action@8b166434ccf42ce9da6ee1fda3f622268812aed5 | |
| with: | |
| mode: enqueue | |
| trigger-drain-workflow: 'true' |