ci: rework lint_front job

Part-of: <https://dev.funkwhale.audio/funkwhale/funkwhale/-/merge_requests/2286>
environments/review-docs-poetr-umn39l/deployments/16928
jo 2022-12-17 19:04:45 +01:00
rodzic 573631b079
commit 1e5273cc5e
1 zmienionych plików z 9 dodań i 11 usunięć

Wyświetl plik

@ -9,6 +9,7 @@ variables:
PYTHONDONTWRITEBYTECODE: "true"
PIP_CACHE_DIR: $CI_PROJECT_DIR/.cache/pip
YARN_CACHE_FOLDER: $CI_PROJECT_DIR/.cache/yarn
.shared_variables:
# Keep the git files permissions during job setup
@ -154,23 +155,20 @@ lint_api:
lint_front:
interruptible: true
image: node:18-alpine
stage: lint
rules:
- if: $CI_COMMIT_BRANCH =~ /(stable|develop)/
- changes: [front/**/*]
image: $CI_REGISTRY/funkwhale/ci/node-python:18
cache:
paths: [$YARN_CACHE_FOLDER]
before_script:
- cd front
- apk add --no-cache jq bash coreutils python3
- yarn install
- yarn install --frozen-lockfile
script:
- yarn lint --max-warnings 0
- yarn lint:tsc
cache:
key: "$CI_PROJECT_ID__eslint_npm_cache"
paths:
- front/node_modules
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
changes:
- front/**/*
test_api:
interruptible: true