Verified Commit 6950ec5b authored by Lauri Timmanee's avatar Lauri Timmanee
Browse files

Issue #3390073 by catch, fjgarlin: Use 'needs' instead of 'dependencies' to...

Issue #3390073 by catch, fjgarlin: Use 'needs' instead of 'dependencies' to speed up gitlab CI jobs and run phpstan first
parent 43169249
Loading
Loading
Loading
Loading
Loading
+8 −8
Original line number Diff line number Diff line
@@ -93,11 +93,11 @@ stages:
  cache:
    policy: pull
    <<: *composer-cache
  dependencies:
  needs:
    - '📦️ Composer'

.with-yarn-cache: &with-yarn-cache
  dependencies:
  needs:
    - '📦️ Yarn'
  cache:
    policy: pull
@@ -247,23 +247,23 @@ stages:
# Lint Jobs
################

'🧹 PHP Coding standards (PHPCS)':
'🧹 PHP Static Analysis (phpstan)':
  <<: [ *with-composer-cache, *junit-artifacts, *default-job-settings-lint ]
  stage: 🪄 Lint
  script:
    - composer phpcs -- --report-full --report-summary --report-\\Micheh\\PhpCodeSniffer\\Report\\Gitlab=phpcs-quality-report.json
    - php vendor/bin/phpstan analyze --configuration=./core/phpstan.neon.dist --error-format=gitlab > phpstan-quality-report.json
  artifacts:
    reports:
      codequality: phpcs-quality-report.json
      codequality: phpstan-quality-report.json

'🧹 PHP Static Analysis (phpstan)':
'🧹 PHP Coding standards (PHPCS)':
  <<: [ *with-composer-cache, *junit-artifacts, *default-job-settings-lint ]
  stage: 🪄 Lint
  script:
    - php vendor/bin/phpstan analyze --configuration=./core/phpstan.neon.dist --error-format=gitlab > phpstan-quality-report.json
    - composer phpcs -- --report-full --report-summary --report-\\Micheh\\PhpCodeSniffer\\Report\\Gitlab=phpcs-quality-report.json
  artifacts:
    reports:
      codequality: phpstan-quality-report.json
      codequality: phpcs-quality-report.json

'🧹 CSS linting (stylelint)':
  <<: [ *with-yarn-cache, *junit-artifacts, *default-job-settings-lint ]
+2 −2
Original line number Diff line number Diff line
@@ -45,14 +45,14 @@ stages:
    - ./core/node_modules

.with-composer-cache: &with-composer-cache
  dependencies:
  needs:
    - '📦️ Composer'
  cache:
    policy: pull
    <<: *composer-cache

.with-yarn-cache: &with-yarn-cache
  dependencies:
  needs:
    - '📦️ Yarn'
  cache:
    policy: pull