From e3a6eddf6edf3e06c100dffe4a495c02c854ad34 Mon Sep 17 00:00:00 2001 From: Lucas Date: Sat, 25 Jun 2022 22:28:56 -0300 Subject: [PATCH 1/2] chore: exclude code coverage from sonarCloud --- sonar-project.properties | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sonar-project.properties b/sonar-project.properties index 7275c1a..6037ac1 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1,2 +1,3 @@ sonar.organization=lucasmsa -sonar.projectKey=lucasmsa_hiit-maker \ No newline at end of file +sonar.projectKey=lucasmsa_hiit-maker +sonar.coverage=** \ No newline at end of file From 0287a6cb46ea562a88d2b13edd2404bc56d50d00 Mon Sep 17 00:00:00 2001 From: Lucas Date: Sat, 25 Jun 2022 22:47:34 -0300 Subject: [PATCH 2/2] chore: update jobs dependency --- .github/workflows/github-actions.js.yml | 69 +++++++++++++------------ 1 file changed, 35 insertions(+), 34 deletions(-) diff --git a/.github/workflows/github-actions.js.yml b/.github/workflows/github-actions.js.yml index f71acf1..68e2dc1 100644 --- a/.github/workflows/github-actions.js.yml +++ b/.github/workflows/github-actions.js.yml @@ -13,28 +13,7 @@ on: # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: - # This workflow contains multiple jobs - SonarCloud: - name: Sonarcloud - runs-on: ubuntu-latest - environment: Production - steps: - - 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 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - - name: SonarQube Quality Gate check - uses: sonarsource/sonarqube-quality-gate-action@master - # Force to fail step after specific time - timeout-minutes: 5 - env: - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - - Build_app: + Build_App: # The type of runner that the job will run on runs-on: ubuntu-latest environment: Production @@ -62,18 +41,40 @@ jobs: - name: Build the app run: | yarn build - - Vercel_deploy: + + # This workflow contains multiple jobs + Sonar_Cloud: + name: Sonarcloud + needs: Build_App runs-on: ubuntu-latest environment: Production steps: - - uses: actions/checkout@v2 - - uses: amondnet/vercel-action@v20 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - vercel-token: ${{ secrets.VERCEL_TOKEN }} - vercel-args: '--prod' - vercel-org-id: ${{ secrets.VERCEL_ORGANIZATION_ID }} #Required - vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }} #Required - working-directory: ./ #Your Working Directory, Optional - + - 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 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + - name: SonarQube Quality Gate check + uses: sonarsource/sonarqube-quality-gate-action@master + # Force to fail step after specific time + timeout-minutes: 5 + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + + Vercel_Deploy: + runs-on: ubuntu-latest + needs: Sonar_Cloud + environment: Production + steps: + - uses: actions/checkout@v2 + - uses: amondnet/vercel-action@v20 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + vercel-token: ${{ secrets.VERCEL_TOKEN }} + vercel-args: '--prod' + vercel-org-id: ${{ secrets.VERCEL_ORGANIZATION_ID }} #Required + vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }} #Required + working-directory: ./ #Your Working Directory, Optional