From f26e5e6f8c4b2e0fa9140560e59cfe5d73d1ea02 Mon Sep 17 00:00:00 2001 From: paul valladares <85648028+dreyfus92@users.noreply.github.com> Date: Wed, 23 Sep 2026 21:00:42 -0500 Subject: [PATCH] ci: run test and lint on pull requests (#66) * ci: run test and lint on pull requests * test(lint): remove obsolete knip snapshot --- .github/workflows/ci.yml | 24 ++++++++++++++++++++ src/commands/__snapshots__/lint.test.ts.snap | 23 ------------------- 2 files changed, 24 insertions(+), 23 deletions(-) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..fb85e33 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,24 @@ +name: CI + +on: + push: + branches: + - main + pull_request: + +permissions: {} + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} + +jobs: + scripts: + if: github.repository_owner == 'bombshell-dev' + uses: bombshell-dev/automation/.github/workflows/run.yml@3a8b4a38fe464b0b51d14962ae416a169517fba9 # main as of 2026-05-13 + with: + commands: > + [ + "test", + "lint" + ] diff --git a/src/commands/__snapshots__/lint.test.ts.snap b/src/commands/__snapshots__/lint.test.ts.snap index b7f078f..3f7006a 100644 --- a/src/commands/__snapshots__/lint.test.ts.snap +++ b/src/commands/__snapshots__/lint.test.ts.snap @@ -1,28 +1,5 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`lint command > runKnip > detects unused exports and unused files 1`] = ` -[ - { - "code": "unused-file", - "column": undefined, - "file": "src/unused-file.ts", - "level": "warning", - "line": undefined, - "message": "Unused file", - "tool": "knip", - }, - { - "code": "unused-export", - "column": 20, - "file": "src/used.ts", - "level": "warning", - "line": 3, - "message": "Unused export 'unusedExport'", - "tool": "knip", - }, -] -`; - exports[`lint command > runKnip > reports dead code only in strict mode 1`] = ` [ { -- knotmirror 0.0.1