From 9565f25a5dac2a933024fe68588b084616c81f35 Mon Sep 17 00:00:00 2001 From: Jacek Wielemborek Date: Mon, 27 Oct 2025 21:00:58 +0000 Subject: [PATCH] refactor: move code quality checks to tests/run-checks.sh script --- Dockerfile | 3 ++- package.json | 4 +--- tests/run-checks.sh | 13 +++++++++++++ 3 files changed, 16 insertions(+), 4 deletions(-) create mode 100755 tests/run-checks.sh diff --git a/Dockerfile b/Dockerfile index 6704bcd..75b84e0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -48,7 +48,8 @@ RUN npm run create-package # Code quality stage - for running quality checks FROM builder AS code_quality -RUN npm run typecheck && npm run lint +COPY tests/run-checks.sh /app/tests/run-checks.sh +RUN chmod +x /app/tests/run-checks.sh && /app/tests/run-checks.sh # Artifacts stage - only contains the built artifacts (for --output) FROM scratch AS artifacts diff --git a/package.json b/package.json index ed0e312..8766095 100644 --- a/package.json +++ b/package.json @@ -19,9 +19,7 @@ "create-package:firefox": "web-ext build --overwrite-dest --artifacts-dir ../web-ext-artifacts", "create-package:chrome": "cd dist-chrome && 7z a -tzip ../web-ext-artifacts/rentgen-chrome-0.1.10.zip * && cd ..", "typecheck": "tsc --noEmit", - "lint": "web-ext lint", - "docker:verify": "docker compose up --force-recreate --build --abort-on-container-exit --exit-code-from rentgen_verify", - "docker:clean": "docker compose down --rmi local --volumes --remove-orphans" + "lint": "web-ext lint" }, "repository": { "type": "git", diff --git a/tests/run-checks.sh b/tests/run-checks.sh new file mode 100755 index 0000000..7736485 --- /dev/null +++ b/tests/run-checks.sh @@ -0,0 +1,13 @@ +#!/bin/bash +# Code quality checks for Rentgen extension +# Runs typecheck and lint + +set -e + +echo "Running type checking..." +npm run typecheck + +echo "Running linter..." +npm run lint + +echo "✓ All code quality checks passed!"