build(deps-dev): bump braces from 3.0.2 to 3.0.3 #39
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Check code quality on pull request | |
on: | |
pull_request: | |
workflow_dispatch: | |
env: | |
SONAR_HOST_URL: https://sonarcloud.io | |
SONAR_PROJECT_KEY: sonarqube-quality-gate-action | |
jobs: | |
sonar-scan: | |
name: Check code quality on pull request branch | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-node@v3 | |
with: | |
cache: npm | |
- name: Install dependencies and run test | |
run: | | |
npm ci | |
npm test | |
- name: SonarCloud Scan | |
uses: SonarSource/sonarcloud-github-action@master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
with: | |
args: > | |
-Dsonar.organization=phwt | |
-Dsonar.projectKey=sonarqube-quality-gate-action | |
-Dsonar.javascript.lcov.reportPaths=./coverage/lcov.info | |
-Dsonar.branch.name=${{ github.event.pull_request.head.ref }} | |
- name: Wait for the quality gate result | |
run: sleep 5 | |
- name: Create a comment with the result | |
uses: ./ | |
id: quality-gate-check | |
with: | |
sonar-host-url: ${{ env.SONAR_HOST_URL }} | |
sonar-project-key: ${{ env.SONAR_PROJECT_KEY }} | |
sonar-token: ${{ secrets.SONAR_TOKEN }} | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
branch: ${{ github.event.pull_request.head.ref }} | |
fail-on-quality-gate-error: true | |
- run: | | |
echo "${{ steps.quality-gate-check.outputs.project-status }}" | |
echo "${{ steps.quality-gate-check.outputs.quality-gate-result }}" | |
sonar-scan-main: | |
name: Retrieve quality gate result of the main branch | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Retrieve quality gate result | |
uses: ./ | |
id: quality-gate-check | |
with: | |
sonar-host-url: ${{ env.SONAR_HOST_URL }} | |
sonar-project-key: ${{ env.SONAR_PROJECT_KEY }} | |
sonar-token: ${{ secrets.SONAR_TOKEN }} | |
disable-pr-comment: true | |
- run: | | |
echo "${{ steps.quality-gate-check.outputs.project-status }}" | |
echo "${{ steps.quality-gate-check.outputs.quality-gate-result }}" |