[gnome-shell-extensions/wip/fmuellner/lint-ci: 17/18] ci: Add "source_check" stage



commit 945eddbc260bc9406a2fde0bf964ad484376ea44
Author: Florian Müllner <fmuellner gnome org>
Date:   Mon Jan 28 04:08:36 2019 +0100

    ci: Add "source_check" stage
    
    More testing is always good, and the static analysis that eslint
    provides goes well beyond what js60 offers, so run it as part of
    the CI.
    
    This will also ensure that new contributions comply with the style
    rules we have set up.
    
    https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/50

 .gitlab-ci.yml | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 1a8388a..af30aee 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,6 +1,20 @@
 stages:
+ - source_check
  - build
 
+variables:
+ LINT_LOG: "eslint-report.txt"
+
+eslint:
+  image: registry.gitlab.gnome.org/gnome/gjs:fedora.static-analysis
+  stage: source_check
+  script:
+    - eslint -o $LINT_LOG -c lint/eslintrc-legacy.json --no-color . || { cat $LINT_LOG; false; }
+  artifacts:
+    paths:
+      - ${LINT_LOG}
+    when: on_failure
+
 build-shell-extensions:
   image: fedora:latest
   stage: build


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