From e017a8838e5a224ee22bf776746d3d443a9dea80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kevin=20R=C3=B6bert?= Date: Wed, 24 Jun 2020 15:51:14 +0200 Subject: [PATCH] Update .gitlab-ci.yml + Test stage + Trigger page and hash only on change --- .gitlab-ci.yml | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index cb241cf..4cb4aef 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,12 +3,21 @@ image: debian:latest before_script: - export DEBIAN_FRONTEND= noninteractive - apt-get update -y - - apt-get install -y zip unzip nodejs + - apt-get install -y zip unzip nodejs jsonlint stages: + - test - build - deploy +test rules: + stage: test + script: + - jsonlint-php data/data.min.json + only: + changes: + - data/data.min.json + hash rules: stage: build script: @@ -22,15 +31,15 @@ hash rules: - rules.minify.hash only: - master + changes: + - data/data.min.json bundle addon: stage: build script: - zip ClearUrls -r -FS clearurls.js browser-polyfill.js manifest.json img/* external_js/* html/* core_js/* css/* fonts/* _locales/* - only: - master - artifacts: paths: - ClearUrls.zip @@ -50,4 +59,9 @@ pages: paths: - public only: - - master \ No newline at end of file + - master + changes: + - GitLabPages/* + - img/clearurls.svg + - data/data.min.json + - build_tools/minifyDataJSON.js \ No newline at end of file