From 61ab0eff2844252e37efa815842cebcd910b1235 Mon Sep 17 00:00:00 2001 From: Manuel Date: Sun, 26 Mar 2023 14:32:21 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20Add=20coverage=20to=20SonarCloud?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/sonarcloud.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index f585203..efaed3a 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -43,6 +43,22 @@ jobs: runs-on: ubuntu-latest steps: + - name: Setup + uses: actions/setup-node@v3 + - name: Checkout + uses: actions/checkout@v3 + - name: Get yarn cache directory path + id: yarn-cache-dir-path + run: echo "::set-output name=dir::$(yarn config get cacheFolder)" + - uses: actions/cache@v3 + id: yarn-cache + with: + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + - run: yarn install --immutable + - run: yarn test:cov - name: Analyze with SonarCloud # You can pin the exact commit or the version. @@ -58,6 +74,7 @@ jobs: # mandatory -Dsonar.projectKey=manuel-rw_jellyfin-discord-music-bot -Dsonar.organization=manuel-rw + -Dsonar.javascript.lcov.reportPaths=coverage/lcov.info # Comma-separated paths to directories containing main source files. #-Dsonar.sources= # optional, default is project base directory # When you need the analysis to take place in a directory other than the one from which it was launched