Template for a good new topic, formatted with Markdown:
- ALM used (GitHub)
- CI system used (Github actions)
- Languages of the repository - Javascript
- https://sonarcloud.io/project/overview?id=sajrashid_React-Dynamic-Json-Table
run yarn coverage to see the coverage report from jest is updated, but not showing the new updates on sonar cloud.
thanks
- Error observed no error just not updating
- Steps to reproduce - run github action
Action
on:
Trigger analysis when pushing in master or pull requests, and when creating
a pull request.
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]
name: Sonar
jobs:
sonarcloud:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Get main
run: git fetch origin main
- name: Install dependencies
run: npm install
- name: Install Jest globally
run: sudo npm install -g jest
- name: Run Tests
run: npm run test
- name: SonarCloud Scan
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}