From f6de92ecdacaa8ca1298d1e116f1cb74134b89a6 Mon Sep 17 00:00:00 2001 From: reesporte Date: Fri, 29 Oct 2021 09:17:12 -0500 Subject: [PATCH] set up jest test coverage in gitlab ci --- .gitlab/.gitlab-ci.yml | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/.gitlab/.gitlab-ci.yml b/.gitlab/.gitlab-ci.yml index ff3210c09..79a3c3329 100644 --- a/.gitlab/.gitlab-ci.yml +++ b/.gitlab/.gitlab-ci.yml @@ -32,6 +32,21 @@ build lattice: - job: install lattice allow_failure: true +run jest tests: + stage: test + image: node:14 + variables: + CI: "true" + script: + - echo "Testing lattice..." + - cd lattice + - npm test -- --coverage --testResultsProcessor=jest-sonar-reporter + artifacts: + paths: + - lattice/coverage/lcov.info + needs: + - job: install lattice + run go tests: stage: test image: golang:1.16.9 @@ -64,18 +79,6 @@ generate coverage html: needs: - job: run go tests -run jest tests: - stage: test - image: sonarsource/sonar-scanner-cli:latest - script: - - cd lattice - - npm install - - npm test -- --coverage --testResultsProcessor=jest-sonar-reporter - - sonar-scanner - artifacts: - paths: - - lattice/coverage/lcov.info - upload to sonarcloud: stage: test image: sonarsource/sonar-scanner-cli:4.6