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
This commit is contained in:
Florian Müllner
2019-01-28 04:08:36 +01:00
parent c37ba0878a
commit 945eddbc26

View File

@@ -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