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



commit 343629c7c8acd7dcaf628320fd05ab8fab8bb047
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.

 .gitlab-ci.yml | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 1a8388a..32a7b0d 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]