From 791c5890ecea3fd3a227d8c0b3f0a2ebfa3d1c3e Mon Sep 17 00:00:00 2001 From: David Scheidt Date: Wed, 11 Feb 2026 15:00:13 +0100 Subject: [PATCH 1/2] feat: add write permissions to the pull request to report test coverage --- .github/workflows/deploy.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 4115c082..06bc924a 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -59,6 +59,11 @@ jobs: vitest: name: ⚡ Test runs-on: ubuntu-latest + permissions: + # Required to checkout the code + contents: read + # Required to put a comment into the pull-request + pull-requests: write steps: - name: ⬇️ Checkout repo uses: actions/checkout@v6 From 7d3f4c14d95834aac950959d27b906e6b080b649 Mon Sep 17 00:00:00 2001 From: David Scheidt Date: Wed, 11 Feb 2026 15:51:44 +0100 Subject: [PATCH 2/2] feat: prevent lingering connections in tests --- vitest.setup.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/vitest.setup.ts b/vitest.setup.ts index 5cd429e8..554ccf72 100644 --- a/vitest.setup.ts +++ b/vitest.setup.ts @@ -1,9 +1,16 @@ import '@testing-library/jest-dom' import { cleanup } from '@testing-library/react' import { afterEach } from 'vitest' +import { pg } from '~/db.server' export const BASE_URL = 'http://localhost:4200' afterEach(() => { cleanup() }) + +afterAll(async () => { + // prevent lingering connections from + // blocking other test suites + await pg.end() +})