diff --git a/.cirrus.yml b/.cirrus.yml index 9bf19620c684..6d56edf221c9 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -128,6 +128,19 @@ validate_license_change_task: $CIRRUS_CHANGE_MESSAGE =~ '.*\[update headers\].*' timeout_in: 180m # Increase timeout, as license changes impact all files, which slows down the analysis considerably. +yarn_check-ci_task: + <<: *TASK_ONLY_DEFAUT_DEPENDING_ON_BUILD_TEMPLATE + timeout_in: 90m + gke_container: + <<: *GKE_CONTAINER_TEMPLATE + cpu: 4 + memory: 8Gb + script: | + ./private/cirrus/cirrus-env.sh YARN + gradle yarn_check-ci + on_failure: + <<: *REPORTS_JUNIT_ON_FAILURE_TEMPLATE + qa_task: <<: *TASK_ONLY_DEFAUT_DEPENDING_ON_BUILD_TEMPLATE gke_container: diff --git a/server/sonar-docs/build.gradle b/server/sonar-docs/build.gradle index 7a078b46c4c8..39051304b87e 100644 --- a/server/sonar-docs/build.gradle +++ b/server/sonar-docs/build.gradle @@ -70,6 +70,18 @@ yarn_run { // To clean outputs outside of "build" directory: clean.dependsOn(cleanYarn_run) +"yarn_check-ci" { + // Note that outputs are not relocatable, because contain absolute paths, and that's why inputs are not relativized + ['config', 'src'].each { + inputs.dir(it) + } + ['package.json', 'yarn.lock', 'tsconfig.json'].each { + inputs.file(it) + } + + dependsOn(yarn) +} + "yarn_validate-ci" { // Note that outputs are not relocatable, because contain absolute paths, and that's why inputs are not relativized ['config', 'src'].each { diff --git a/server/sonar-docs/package.json b/server/sonar-docs/package.json index 6482390b418d..6eaecc424729 100644 --- a/server/sonar-docs/package.json +++ b/server/sonar-docs/package.json @@ -74,7 +74,8 @@ "lint-report": "eslint --ext js,ts,tsx -f json -o eslint-report.json src", "ts-check": "tsc --noEmit", "validate": "yarn lint && yarn ts-check && yarn format-check && yarn test", - "validate-ci": "yarn lint-report && yarn ts-check && yarn format-check && yarn test --coverage" + "validate-ci": "yarn lint-report && yarn test --coverage", + "check-ci": "yarn ts-check && yarn format-check" }, "prettier": { "jsxBracketSameLine": true, diff --git a/server/sonar-web/build.gradle b/server/sonar-web/build.gradle index a7d2411047fb..429a2c1c262b 100644 --- a/server/sonar-web/build.gradle +++ b/server/sonar-web/build.gradle @@ -27,6 +27,18 @@ yarn_run { } build.dependsOn(yarn_run) +"yarn_check-ci" { + // Note that outputs are not relocatable, because contain absolute paths, and that's why inputs are not relativized + ['config', 'src'].each { + inputs.dir(it) + } + ['package.json', 'yarn.lock', 'tsconfig.json'].each { + inputs.file(it) + } + + dependsOn(yarn) +} + "yarn_validate-ci" { // Note that outputs are not relocatable, because contain absolute paths, and that's why inputs are not relativized ['config', 'src/main/js'].each { diff --git a/server/sonar-web/package.json b/server/sonar-web/package.json index 941f8fe2b63e..b37be90d3e75 100644 --- a/server/sonar-web/package.json +++ b/server/sonar-web/package.json @@ -132,7 +132,8 @@ "lint-report": "eslint --ext js,ts,tsx -f json -o eslint-report.json src/main/js", "ts-check": "tsc --noEmit", "validate": "yarn lint && yarn ts-check && yarn format-check && yarn test", - "validate-ci": "yarn lint-report && yarn ts-check && yarn format-check && yarn test --coverage", + "validate-ci": "yarn lint-report && yarn test --coverage", + "check-ci": "yarn ts-check && yarn format-check", "precommit": "yarn ts-check && lint-staged" }, "engines": {