From e816e3dba5a506c561af5ddba62a7ee9f51dbbf2 Mon Sep 17 00:00:00 2001 From: Adam Setch Date: Sat, 14 Sep 2024 23:50:31 -0400 Subject: [PATCH] build: add sonarcloud step Signed-off-by: Adam Setch --- .github/workflows/test.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 72b35833..2f77901c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,6 +21,24 @@ jobs: - run: pnpm install - run: pnpm tsc --noEmit - run: pnpm test -- --coverage --runInBand --verbose + - name: Archive code coverage results + uses: actions/upload-artifact@v4 + with: + name: code-coverage-report + path: coverage/**/* + + sonarcloud: + name: SonarCloud Analysis + runs-on: ubuntu-latest + needs: run-unit-tests + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis + - name: Download a single artifact + uses: actions/download-artifact@v4 + with: + name: code-coverage-report - name: SonarCloud Scan uses: SonarSource/sonarcloud-github-action@master env: