Skip to content

Commit

Permalink
Update build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Karma-Tsering authored Aug 22, 2024
1 parent 6811b08 commit 7ac99cf
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,34 @@ on:
- main
pull_request:
types: [opened, synchronize, reopened]

jobs:
sonarcloud:
name: SonarCloud
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
fetch-depth: 0 # Shallow clones should be disabled for better analysis relevancy

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18.x' # or your project's Node.js version

- name: Install dependencies
run: npm install

- name: Run tests and generate coverage
run: npm run test "./app/routes/model.ocr/component/ImageCropper.test.js" -- --coverage

- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
uses: SonarSource/sonarcloud-github-action@v1.8
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
args: >
-Dsonar.organization=openpecha
-Dsonar.projectKey=OpenPecha_monlamai-app-web
-Dsonar.javascript.lcov.reportPaths=coverage/lcov.info

0 comments on commit 7ac99cf

Please sign in to comment.