diff --git a/.github/workflows/stage-2-test.yaml b/.github/workflows/stage-2-test.yaml index 37148449..047729a1 100644 --- a/.github/workflows/stage-2-test.yaml +++ b/.github/workflows/stage-2-test.yaml @@ -126,6 +126,31 @@ jobs: - name: "Run linting" run: | make test-lint + test-knip: + name: "Knip" + runs-on: ubuntu-latest + timeout-minutes: 5 + steps: + - name: "Checkout code" + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - name: "Setup pnpm" + uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0 + with: + version: 10.33.0 + - name: "Use Node.js" + uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 + with: + node-version-file: '.tool-versions' + cache: 'pnpm' + - name: "Repo setup" + run: | + pnpm install --frozen-lockfile + - name: "Generate dependencies" + run: | + pnpm run generate-dependencies + - name: "Run knip" + run: | + make test-knip test-typecheck: name: "Typecheck" runs-on: ubuntu-latest diff --git a/scripts/tests/knip.sh b/scripts/tests/knip.sh new file mode 100755 index 00000000..bd2f7f5a --- /dev/null +++ b/scripts/tests/knip.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +set -euo pipefail + +cd "$(git rev-parse --show-toplevel)" + +pnpm install --frozen-lockfile +pnpm run knip diff --git a/scripts/tests/test.mk b/scripts/tests/test.mk index d9303d92..152946f6 100644 --- a/scripts/tests/test.mk +++ b/scripts/tests/test.mk @@ -38,6 +38,9 @@ test-integration-debug: # Debug a live environment - inspect queues, tail logs, queue-status queue-peek tail-transform tail-webhook tail-pipe pipe-state: @: +test-knip: # Run knip dependency analysis + make _test name="knip" + test-load: # Run all your load tests @Testing make \ test-capacity \