From 68ec441b9560623feabaa38f4ea6355055e411a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Uzna=C5=84ski?= Date: Wed, 2 Dec 2020 16:08:00 +0100 Subject: [PATCH] [FEATURE] Add frontend linting to GitLab CI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Łukasz Uznański --- .gitlab/pipeline/.gitlab-ci.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/.gitlab/pipeline/.gitlab-ci.yml b/.gitlab/pipeline/.gitlab-ci.yml index 3972f57..3b796ab 100644 --- a/.gitlab/pipeline/.gitlab-ci.yml +++ b/.gitlab/pipeline/.gitlab-ci.yml @@ -23,6 +23,19 @@ variables: before_script: - bash .gitlab/build/docker_install.sh > /dev/null +.default-frontend: + image: node:latest + needs: [ ] + cache: + key: "$CI_PROJECT_ID" + paths: + - Resources/Private/node_modules/ + - Resources/Private/.yarn + before_script: + - npm install -g eslint + - cd ./Resources/Private + - yarn install --cache-folder .yarn + build-composer-dependencies: extends: .default stage: build @@ -101,6 +114,18 @@ xliff-lint: - xmllint --schema ./xliff-core-1.2-strict.xsd --noout $(find Resources -name '*.xlf') +javascript-lint: + extends: .default-frontend + stage: lint + script: + - yarn lint:js + +style-lint: + extends: .default-frontend + stage: lint + script: + - yarn lint:style + unit-php7.2-v10: extends: .default image: php:7.2