refactor: move code quality checks to tests/run-checks.sh script
This commit is contained in:
parent
ccd35baf2c
commit
9565f25a5d
@ -48,7 +48,8 @@ RUN npm run create-package
|
|||||||
|
|
||||||
# Code quality stage - for running quality checks
|
# Code quality stage - for running quality checks
|
||||||
FROM builder AS code_quality
|
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)
|
# Artifacts stage - only contains the built artifacts (for --output)
|
||||||
FROM scratch AS artifacts
|
FROM scratch AS artifacts
|
||||||
|
|||||||
@ -19,9 +19,7 @@
|
|||||||
"create-package:firefox": "web-ext build --overwrite-dest --artifacts-dir ../web-ext-artifacts",
|
"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 ..",
|
"create-package:chrome": "cd dist-chrome && 7z a -tzip ../web-ext-artifacts/rentgen-chrome-0.1.10.zip * && cd ..",
|
||||||
"typecheck": "tsc --noEmit",
|
"typecheck": "tsc --noEmit",
|
||||||
"lint": "web-ext lint",
|
"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"
|
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|||||||
13
tests/run-checks.sh
Executable file
13
tests/run-checks.sh
Executable file
@ -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!"
|
||||||
Loading…
x
Reference in New Issue
Block a user