From 25b96a4d03f4bd6c0dbe3f1909eb62af10960c53 Mon Sep 17 00:00:00 2001 From: "Visal .In" Date: Thu, 1 Feb 2024 09:40:06 +0700 Subject: [PATCH] feat: add test coverage to sonarcloud --- .github/workflows/coverage.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/coverage.yml diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml new file mode 100644 index 00000000..6537e9c4 --- /dev/null +++ b/.github/workflows/coverage.yml @@ -0,0 +1,23 @@ +name: Build +on: + push: + branches: + - master + pull_request: + types: [opened, synchronize, reopened] +jobs: + sonarcloud: + name: SonarCloud + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Install dependencies + run: npm install + - name: Test and coverage + run: npm run test --coverage + - name: SonarCloud Scan + uses: SonarSource/sonarcloud-github-action@master + env: + SONAR_TOKEN: ${{secrets.SONARCLOUD_TOKEN}}