ci: rework lint_front job
Part-of: <https://dev.funkwhale.audio/funkwhale/funkwhale/-/merge_requests/2286>
This commit is contained in:
parent
573631b079
commit
1e5273cc5e
|
@ -9,6 +9,7 @@ variables:
|
||||||
PYTHONDONTWRITEBYTECODE: "true"
|
PYTHONDONTWRITEBYTECODE: "true"
|
||||||
|
|
||||||
PIP_CACHE_DIR: $CI_PROJECT_DIR/.cache/pip
|
PIP_CACHE_DIR: $CI_PROJECT_DIR/.cache/pip
|
||||||
|
YARN_CACHE_FOLDER: $CI_PROJECT_DIR/.cache/yarn
|
||||||
|
|
||||||
.shared_variables:
|
.shared_variables:
|
||||||
# Keep the git files permissions during job setup
|
# Keep the git files permissions during job setup
|
||||||
|
@ -154,23 +155,20 @@ lint_api:
|
||||||
|
|
||||||
lint_front:
|
lint_front:
|
||||||
interruptible: true
|
interruptible: true
|
||||||
image: node:18-alpine
|
|
||||||
stage: lint
|
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:
|
before_script:
|
||||||
- cd front
|
- cd front
|
||||||
- apk add --no-cache jq bash coreutils python3
|
- yarn install --frozen-lockfile
|
||||||
- yarn install
|
|
||||||
script:
|
script:
|
||||||
- yarn lint --max-warnings 0
|
- yarn lint --max-warnings 0
|
||||||
- yarn lint:tsc
|
- 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:
|
test_api:
|
||||||
interruptible: true
|
interruptible: true
|
||||||
|
|
Loading…
Reference in New Issue