Quality Gate not computed

I’m using Github Actions, to make sure code coverage is calculated on SonarCloud
The project is Typescript only

jest:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
        with:
          fetch-depth: 0
      - name: Install modules
        run: npm install
      - 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 }}

SonarCloud Project URL

SonarCloud seems to analyse my push’s.
https://sonarcloud.io/project/activity?id=firecow_node-filebeat-logger

SonarCloud is telling me my main branch doesn’t contain any lines of code, and because of this doesn’t let the project pass the Quality Gate
https://sonarcloud.io/dashboard?id=firecow_node-filebeat-logger

I’ve tried deleting on SonarCloud and recreate.
I’ve added SONAR_TOKEN under Github Project Settings

Here is the source code.
https://github.com/firecow/node-filebeat-logger

I’m lost, and I need help :smiley:
What am I doing wrong here ?

Hello Mads,

Welcome to the community!

Have you set a new code definition for your project?

I have no clue, so I probably haven’t :smiley:

I think I have added it now.

It still says “The main branch of this project is empty”, but the Quality Gate became green.
Thanks man :blush:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.