From fd57bbce3d6a9550ba4628fd3b8d0e857d9a4e24 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Wed, 24 Feb 2021 13:53:24 +0100 Subject: [PATCH] chore(gitlab-ci): execute hlint directly --- .gitlab-ci.yml | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e685244ac..08d1f7694 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -257,14 +257,26 @@ yesod:test:hlint: - job: frontend:build #transitive artifacts: false - job: yesod:build - artifacts: true + artifacts: false rules: - if: $CI_COMMIT_REF_NAME =~ /^v[0-9].*/ when: on_success + before_script: *haskell script: - - bin/test-hlint + - stack install hlint + - stack exec -- hlint --cc src > gl-code-quality-report.json + - jq . gl-code-quality-report.json + + artifacts: + paths: + - gl-code-quality-report.json + name: "${CI_JOB_NAME}-${CI_COMMIT_SHORT_SHA}" + expire_in: "1 week" + + reports: + codequality: gl-code-quality-report.json retry: 2 interruptible: true @@ -279,7 +291,7 @@ yesod:test:hlint:dev: - job: frontend:build #transitive artifacts: false - job: yesod:build:dev - artifacts: true + artifacts: false rules: - if: $CI_COMMIT_REF_NAME =~ /(^v[0-9].*)|((^|\/)profile($|\/))/ @@ -287,8 +299,20 @@ yesod:test:hlint:dev: allow_failure: true - when: on_success + before_script: *haskell script: - - bin/test-hlint + - stack install hlint + - stack exec -- hlint --cc src > gl-code-quality-report.json + - jq . gl-code-quality-report.json + + artifacts: + paths: + - gl-code-quality-report.json + name: "${CI_JOB_NAME}-${CI_COMMIT_SHORT_SHA}" + expire_in: "1 week" + + reports: + codequality: gl-code-quality-report.json retry: 2 interruptible: true