aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-docs
diff options
context:
space:
mode:
authorEvgeny Mandrikov <138671+Godin@users.noreply.github.com>2019-05-15 17:21:37 +0200
committerSonarTech <sonartech@sonarsource.com>2019-05-15 20:21:12 +0200
commitc24973e34ca984aeb43409a12a064b026abf5740 (patch)
tree296bd64a6f19ef55d467f2d8a783d2597beb04ec /server/sonar-docs
parentf167719e46408daff650cda6b4df5c0a547d2257 (diff)
downloadsonarqube-c24973e34ca984aeb43409a12a064b026abf5740.tar.gz
sonarqube-c24973e34ca984aeb43409a12a064b026abf5740.zip
Enable Gradle cache for "yarn_validate-ci" tasks (#1616)
Diffstat (limited to 'server/sonar-docs')
-rw-r--r--server/sonar-docs/.gitignore3
-rw-r--r--server/sonar-docs/build.gradle13
-rw-r--r--server/sonar-docs/package.json3
3 files changed, 16 insertions, 3 deletions
diff --git a/server/sonar-docs/.gitignore b/server/sonar-docs/.gitignore
index b93c463eaba..37a17026f19 100644
--- a/server/sonar-docs/.gitignore
+++ b/server/sonar-docs/.gitignore
@@ -15,3 +15,6 @@ public
# tests
lcov.info
coverage/
+
+# eslint
+eslint-report.json
diff --git a/server/sonar-docs/build.gradle b/server/sonar-docs/build.gradle
index f5ad4f00e91..868a0e61348 100644
--- a/server/sonar-docs/build.gradle
+++ b/server/sonar-docs/build.gradle
@@ -24,8 +24,17 @@ yarn_run {
args = ['build']
}
-task "yarn_lint-report"() {
-
+"yarn_validate-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', '.eslintrc'].each {
+ inputs.file(it)
+ }
+ outputs.file('eslint-report.json')
+ outputs.dir('coverage')
+ outputs.cacheIf { true }
}
task zip(type: Zip) {
diff --git a/server/sonar-docs/package.json b/server/sonar-docs/package.json
index ad2b1e4e63d..fefe53c9881 100644
--- a/server/sonar-docs/package.json
+++ b/server/sonar-docs/package.json
@@ -63,9 +63,10 @@
"format": "prettier --write --list-different 'src/**/*.{js,ts,tsx,css}'",
"format-check": "prettier --list-different 'src/**/*.{js,ts,tsx,css}'",
"lint": "eslint --ext js,ts,tsx --quiet src",
+ "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 && yarn ts-check && yarn format-check && yarn test"
+ "validate-ci": "yarn lint-report && yarn ts-check && yarn format-check && yarn test --coverage"
},
"prettier": {
"jsxBracketSameLine": true,