[gnome-shell] ci: Use junit output format



commit 4401c8fae7043091ba57c3fd6237a5c4149a5fb4
Author: Florian Müllner <fmuellner gnome org>
Date:   Sat Nov 7 07:36:26 2020 +0100

    ci: Use junit output format
    
    Gitlab has built-in support for junit reports, so switch eslint's
    output to that format.
    
    https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1497

 .gitlab-ci.yml        | 8 ++++----
 .gitlab-ci/run-eslint | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 52e60764d7..195bb8a6d9 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -9,7 +9,7 @@ stages:
 variables:
     BUNDLE: "extensions-git.flatpak"
     JS_LOG: "js-report.txt"
-    LINT_LOG: "eslint-report.txt"
+    LINT_LOG: "eslint-report.xml"
 
 .only_default: &only_default
     only:
@@ -44,11 +44,11 @@ eslint:
     stage: review
     script:
         - export NODE_PATH=$(npm root -g)
-        - ./.gitlab-ci/run-eslint --output-file ${LINT_LOG}
+        - ./.gitlab-ci/run-eslint --output-file ${LINT_LOG} --format junit
     <<: *only_default
     artifacts:
-        paths:
-            - ${LINT_LOG}
+        reports:
+            junit: ${LINT_LOG}
         when: always
 
 potfile_check:
diff --git a/.gitlab-ci/run-eslint b/.gitlab-ci/run-eslint
index 68a664109f..2a8f60d392 100755
--- a/.gitlab-ci/run-eslint
+++ b/.gitlab-ci/run-eslint
@@ -111,7 +111,7 @@ function getOption(...names) {
     const results = await Promise.all(ops);
     const commonResults = createCommon(...results, branch !== undefined);
 
-    const formatter = await regular.loadFormatter();
+    const formatter = await regular.loadFormatter(getOption('--format', '-f'));
     const resultText = formatter.format(commonResults);
 
     if (outputPath) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]