From e8191a679c9536d7cc49bcead8d7870dcefa18d7 Mon Sep 17 00:00:00 2001 From: Eduardo Gurgel <51385738+EduardoGurgel@users.noreply.github.com> Date: Sun, 22 Oct 2023 15:34:05 -0300 Subject: [PATCH] Update build.yml --- .github/workflows/build.yml | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5f896a6..df7e72b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,20 +1,24 @@ name: Build on: - push: - branches: - - master - pull_request: - types: [opened, synchronize, reopened] + push: + branches: + - master + pull_request: + types: [opened, synchronize, reopened] jobs: - sonarcloud: - name: SonarCloud + sonarqube: + name: sonarqube runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v2 with: - fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis - - name: SonarCloud Scan - uses: SonarSource/sonarcloud-github-action@master + fetch-depth: 0 + - name: Install dependencies + run: yarn + - name: Test and coverage + run: yarn jest --coverage + - name: SonarQube Scan + uses: SonarSource/sonarqube-scan-action@master env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}