[epiphany] Run ESLint on CI



commit 5ddb98c1268ba9ad79c5caa9b527b244bc4f29f3
Author: Sonny Piers <sonny fastmail net>
Date:   Thu Jan 21 14:47:31 2021 +0100

    Run ESLint on CI
    
    Inspired by https://gitlab.gnome.org/GNOME/gnome-sound-recorder/-/merge_requests/43

 .gitlab-ci.yml | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 669a33331..e3cd3364a 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -10,6 +10,7 @@ variables:
   RUNTIME_REPO: 'https://nightly.gnome.org/gnome-nightly.flatpakrepo'
   FLATPAK_MODULE: 'epiphany'
   APP_ID: 'org.gnome.Epiphany.Devel'
+  ESLINT_LOG: "eslint-report.txt"
 
 stages:
   - test
@@ -19,9 +20,15 @@ check-code-style:
   image: alpine:latest
   interruptible: true
   before_script:
-    - apk update && apk add uncrustify bash python3
+    - apk update && apk add uncrustify bash python3 nodejs nodejs-npm
+    - npm install -g eslint
   script:
     - bash data/check-code-style
+    - eslint -o eslint-report.txt --no-color embed/web-process-extension/resources/js/ || { cat $ESLINT_LOG; 
false; }
+  artifacts:
+    paths:
+      - ${ESLINT_LOG}
+    when: on_failure
 
 flatpak:
   extends: '.flatpak'


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