Files
gnome-shell-extensions/.gitlab-ci.yml
T
Florian Müllner fc8a46f15a ci: Syntax-check js sources
This is currently done as part of `ninja test`, but doing the check
in a separate CI job means it can run in parallel with other review
jobs and fail before trying to build.

https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/116
2020-04-11 01:07:55 +02:00

63 lines
1.2 KiB
YAML

image: registry.gitlab.gnome.org/gnome/gnome-shell/extension-ci:v2
stages:
- review
- build
variables:
LINT_LOG: "eslint-report.txt"
JS_LOG: "js-report.txt"
.only_default: &only_default
only:
- branches
- tags
- merge_requests
check_commit_log:
image: registry.gitlab.gnome.org/gnome/gjs:fedora.static-analysis
stage: review
script:
- ./.gitlab-ci/check-commit-log.sh
only:
- merge_requests
js_check:
stage: review
script:
- find extensions -name '*.js' -exec js68 -c -s '{}' ';' 2>&1 | tee $JS_LOG
- (! grep -q . $JS_LOG)
<<: *only_default
artifacts:
paths:
- ${JS_LOG}
when: on_failure
eslint:
stage: review
script:
- eslint -o $LINT_LOG extensions --no-color || { cat $LINT_LOG; false; }
<<: *only_default
artifacts:
paths:
- ${LINT_LOG}
when: on_failure
build-shell-extensions:
stage: build
script:
- meson _build .
- ninja -C _build test install
<<: *only_default
build-bundles:
stage: build
script:
- ./export-zips.sh
<<: *only_default
artifacts:
name: 'Extension bundles'
expose_as: 'Get Extension bundles here'
paths:
- zip-files/