SonarCloud Coverage with Typescript and GitHub Actions

  • ALM used GitHub
  • CI system used GitHub Actions
  • Languages of the repository: Typescript

I have this in my GitHub Actions CI


  sonar-scan:
    runs-on: ubuntu-latest
    steps:
      - name: "Checkout repository on branch: ${{ github.REF }}"
        uses: actions/checkout@v4
        with:
          ref: ${{ github.HEAD_REF }}
          fetch-depth: 0

      - name: Set up Node.js
        uses: actions/setup-node@v4
        with:
          node-version: 20.x

      - name: Install dependencies
        run: npm install .

      - name: Lint Project
        run: npm run lint

      - name: Run unit tests
        run: npm run test

      - uses: actions/checkout@v4
        with:
          fetch-depth: 0
      - name: SonarCloud Scan
        uses: sonarsource/sonarcloud-github-action@master
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

and my sonar-project.properties file

projectKey=token-metrics_tokenmetrics-3.0
sonar.organization=tokenmetrics
sonar.projectName=tokenmetrics-3.0
sonar.projectVersion=1.0

sonar.sources=.
sonar.sourceEncoding=UTF-8

sonar.exclusions=public/tradingView/**,public/tradingView/**/*,__tests__/mock/*
sonar.javascript.lcov.reportPaths=./coverage/lcov.info

But SonarCloud analysis still shows 0.0% coverage, and when I run

npm run test
It generate 100% code coverage.

Please what could be the issue

Hey there.

Technichally what SonarCloud is saying in this PR decoration is that there’s no coverage information on new cdoe, not that you have 0% coverage (there’s a difference!)

Can you take a screenshot fo the pull request overview dashboard for this PR in SonarCloud?

You should be able to see if there’s an estimated after merge value in that page, which would indicate coverage is being imported successfully. If you have a PR that is just changing the workflow file, for example, you would have no coverage on new code to be displayed (because your workflow file can’t be covered by tests).

It doesn’t cover anything, here

What do the logs say about importing code coverage?

@Colin
This are the logs generated by sonarscan during the CI

Run sonarsource/sonarcloud-github-action@master
/usr/bin/docker run --name d9b76270235c6dd94a7eb554631fb9997542_abfca9 --label 37d9b7 --workdir /github/workspace --rm -e "GITHUB_TOKEN" -e "SONAR_TOKEN" -e "INPUT_ARGS" -e "INPUT_PROJECTBASEDIR" -e "HOME" -e "GITHUB_JOB" -e "GITHUB_REF" -e "GITHUB_SHA" -e "GITHUB_REPOSITORY" -e "GITHUB_REPOSITORY_OWNER" -e "GITHUB_REPOSITORY_OWNER_ID" -e "GITHUB_RUN_ID" -e "GITHUB_RUN_NUMBER" -e "GITHUB_RETENTION_DAYS" -e "GITHUB_RUN_ATTEMPT" -e "GITHUB_REPOSITORY_ID" -e "GITHUB_ACTOR_ID" -e "GITHUB_ACTOR" -e "GITHUB_TRIGGERING_ACTOR" -e "GITHUB_WORKFLOW" -e "GITHUB_HEAD_REF" -e "GITHUB_BASE_REF" -e "GITHUB_EVENT_NAME" -e "GITHUB_SERVER_URL" -e "GITHUB_API_URL" -e "GITHUB_GRAPHQL_URL" -e "GITHUB_REF_NAME" -e "GITHUB_REF_PROTECTED" -e "GITHUB_REF_TYPE" -e "GITHUB_WORKFLOW_REF" -e "GITHUB_WORKFLOW_SHA" -e "GITHUB_WORKSPACE" -e "GITHUB_ACTION" -e "GITHUB_EVENT_PATH" -e "GITHUB_ACTION_REPOSITORY" -e "GITHUB_ACTION_REF" -e "GITHUB_PATH" -e "GITHUB_ENV" -e "GITHUB_STEP_SUMMARY" -e "GITHUB_STATE" -e "GITHUB_OUTPUT" -e "RUNNER_OS" -e "RUNNER_ARCH" -e "RUNNER_NAME" -e "RUNNER_ENVIRONMENT" -e "RUNNER_TOOL_CACHE" -e "RUNNER_TEMP" -e "RUNNER_WORKSPACE" -e "ACTIONS_RUNTIME_URL" -e "ACTIONS_RUNTIME_TOKEN" -e "ACTIONS_CACHE_URL" -e "ACTIONS_RESULTS_URL" -e GITHUB_ACTIONS=true -e CI=true --entrypoint "/entrypoint.sh" -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/tm-airdrop/tm-airdrop":"/github/workspace" 37d9b7:6270235c6dd94a7eb554631fb9997542
INFO: Scanner configuration file: /opt/sonar-scanner/conf/sonar-scanner.properties
INFO: Project root configuration file: /github/workspace/sonar-project.properties
INFO: SonarScanner 5.0.1.3006
INFO: Java 17.0.11 Alpine (64-bit)
INFO: Linux 6.5.0-1021-azure amd64
INFO: User cache: /opt/sonar-scanner/.sonar/cache
INFO: Analyzing on SonarCloud
INFO: Default locale: "en_US", source code encoding: "UTF-8"
INFO: Load global settings
INFO: Load global settings (done) | time=298ms
INFO: Server id: 1BD809FA-AWHW8ct9-T_TB3XqouNu
INFO: Loading required plugins
INFO: Load plugins index
INFO: Load plugins index (done) | time=433ms
INFO: Load/download plugins
INFO: Load/download plugins (done) | time=979ms
INFO: Found an active CI vendor: 'Github Actions'
INFO: Load project settings for component key: 'token-metrics_tm-airdrop'
INFO: Load project settings for component key: 'token-metrics_tm-airdrop' (done) | time=154ms
INFO: Process project properties
INFO: Project key: token-metrics_tm-airdrop
INFO: Base dir: /github/workspace
INFO: Working dir: /github/workspace/.scannerwork
INFO: Load project branches
INFO: Load project branches (done) | time=198ms
INFO: Check ALM binding of project 'token-metrics_tm-airdrop'
INFO: Detected project binding: BOUND
INFO: Check ALM binding of project 'token-metrics_tm-airdrop' (done) | time=392ms
INFO: Load project pull requests
INFO: Load project pull requests (done) | time=524ms
INFO: Load branch configuration
INFO: Github event: push
INFO: Auto-configuring branch development
INFO: Load branch configuration (done) | time=7ms
INFO: Load quality profiles
INFO: Load quality profiles (done) | time=463ms
INFO: Load active rules
INFO: Load active rules (done) | time=9078ms
INFO: Organization key: tokenmetrics
INFO: Branch name: development, type: long-lived
INFO: Preprocessing files...
INFO: 5 languages detected in 254 preprocessed files
INFO: 0 files ignored because of inclusion/exclusion patterns
INFO: 0 files ignored because of scm ignore settings
INFO: Loading plugins for detected languages
INFO: Load/download plugins
INFO: Load/download plugins (done) | time=1248ms
INFO: Load project repositories
INFO: Load project repositories (done) | time=170ms
INFO: Indexing files...
INFO: Project configuration:
INFO:   Excluded sources: **/build-wrapper-dump.json
INFO: 253 files indexed
INFO: Quality profile for css: Sonar way
INFO: Quality profile for js: Sonar way
INFO: Quality profile for json: Sonar way
INFO: Quality profile for ts: Sonar way
INFO: Quality profile for yaml: Sonar way
INFO: ------------- Run sensors on module tm-airdrop
INFO: Load metrics repository
INFO: Load metrics repository (done) | time=146ms
INFO: Sensor cache enabled
INFO: Load sensor cache
INFO: Load sensor cache (688 KB) | time=2378ms
INFO: Sensor HTML [web]
INFO: Sensor HTML [web] (done) | time=6ms
INFO: Sensor JaCoCo XML Report Importer [jacoco]
INFO: 'sonar.coverage.jacoco.xmlReportPaths' is not defined. Using default locations: target/site/jacoco/jacoco.xml,target/site/jacoco-it/jacoco.xml,build/reports/jacoco/test/jacocoTestReport.xml
INFO: No report imported, no coverage information will be imported by JaCoCo XML Report Importer
INFO: Sensor JaCoCo XML Report Importer [jacoco] (done) | time=1ms
INFO: Sensor IaC CloudFormation Sensor [iac]
INFO: 0 source files to be analyzed
INFO: 0/0 source files have been analyzed
INFO: Sensor IaC CloudFormation Sensor [iac] (done) | time=189ms
INFO: Sensor IaC Kubernetes Sensor [iac]
INFO: 13 source files to be analyzed
ERROR: Failed to evaluate Helm file helm/tm-airdrop/templates/deployment.yaml: Template evaluation failed
ERROR: Failed to evaluate Helm file helm/tm-airdrop/templates/ingress.yaml: Template evaluation failed
INFO: 13/13 source files have been analyzed
INFO: Sensor IaC Kubernetes Sensor [iac] (done) | time=510ms
INFO: Sensor IaC AzureResourceManager Sensor [iac]
INFO: 0 source files to be analyzed
INFO: 0/0 source files have been analyzed
INFO: Sensor IaC AzureResourceManager Sensor [iac] (done) | time=95ms
INFO: Sensor Java Config Sensor [iac]
INFO: 0 source files to be analyzed
INFO: 0/0 source files have been analyzed
INFO: Sensor Java Config Sensor [iac] (done) | time=9ms
INFO: Sensor JavaScript/TypeScript analysis [javascript]
INFO: Detected os: Linux arch: amd64 alpine: true. Platform: UNSUPPORTED
INFO: Using Node.js executable: 'node'.
INFO: Memory configuration: OS (7929 MB), Node.js (2096 MB).
INFO: Resolving TSConfig files using 'tsconfig.json' from property sonar.typescript.tsconfigPath
INFO: Found 1 TSConfig file(s): [/github/workspace/tsconfig.json]
INFO: Creating TypeScript program
INFO: TypeScript configuration file /github/workspace/tsconfig.json
INFO: 166 source files to be analyzed
INFO: Starting analysis with current program
INFO: 86/166 files analyzed, current file: src/components/leaderboad/LeaderboardTable.tsx
INFO: Analyzed 161 file(s) with current program
INFO: Found 5 file(s) not part of any tsconfig.json: they will be analyzed without type information
INFO: 166/166 source files have been analyzed
INFO: Hit the cache for 0 out of 166
INFO: Miss the cache for 166 out of 166: ANALYSIS_MODE_INELIGIBLE [166/166]
INFO: Sensor JavaScript/TypeScript analysis [javascript] (done) | time=22802ms
INFO: Sensor JavaScript inside YAML analysis [javascript]
INFO: No input files found for analysis
INFO: Hit the cache for 0 out of 0
INFO: Miss the cache for 0 out of 0
INFO: Sensor JavaScript inside YAML analysis [javascript] (done) | time=11ms
INFO: Sensor CSS Rules [javascript]
INFO: 2 source files to be analyzed
INFO: 2/2 source files have been analyzed
INFO: Hit the cache for 0 out of 0
INFO: Miss the cache for 0 out of 0
INFO: Sensor CSS Rules [javascript] (done) | time=180ms
INFO: Sensor JavaScript/TypeScript Coverage [javascript]
INFO: No LCOV files were found using ./coverage/lcov.info
WARN: No coverage information will be saved because all LCOV files cannot be found.
INFO: Sensor JavaScript/TypeScript Coverage [javascript] (done) | time=437ms
INFO: Sensor CSS Metrics [javascript]
INFO: Sensor CSS Metrics [javascript] (done) | time=21ms
INFO: Sensor IaC Docker Sensor [iac]
INFO: 0 source files to be analyzed
INFO: 0/0 source files have been analyzed
INFO: Sensor IaC Docker Sensor [iac] (done) | time=56ms
INFO: Sensor Serverless configuration file sensor [security]
INFO: 0 Serverless function entries were found in the project
INFO: 0 Serverless function handlers were kept as entrypoints
INFO: Sensor Serverless configuration file sensor [security] (done) | time=6ms
INFO: Sensor AWS SAM template file sensor [security]
INFO: Sensor AWS SAM template file sensor [security] (done) | time=15ms
INFO: Sensor AWS SAM Inline template file sensor [security]
INFO: Sensor AWS SAM Inline template file sensor [security] (done) | time=4ms
INFO: Sensor TextAndSecretsSensor [text]
INFO: Available processors: 2
INFO: Using 2 threads for analysis.
INFO: 198 source files to be analyzed
INFO: 198/198 source files have been analyzed
INFO: Sensor TextAndSecretsSensor [text] (done) | time=6018ms
INFO: Sensor JavaSecuritySensor [security]
INFO: Enabled taint analysis rules: S2076, S2078, S2083, S2091, S2631, S3649, S5131, S5135, S5144, S5145, S5146, S5147, S5334, S5883, S6096, S6173, S6287, S6350, S6384, S6390, S6398, S6399, S6547, S6549
INFO: Load type hierarchy and UCFGs: Starting
INFO: Load type hierarchy: Starting
INFO: Reading type hierarchy from: /github/workspace/.scannerwork/ucfg2/java
INFO: Read 0 type definitions
INFO: Load type hierarchy: Time spent was 00:00:00.005
INFO: Load UCFGs: Starting
INFO: Load UCFGs: Time spent was 00:00:00.000
INFO: Load type hierarchy and UCFGs: Time spent was 00:00:00.008
INFO: No UCFGs have been included for analysis.
INFO: java security sensor: Time spent was 00:00:00.026
INFO: java security sensor: Begin: 2024-05-23T11:42:44.451896508Z, End: 2024-05-23T11:42:44.478347581Z, Duration: 00:00:00.026
  Load type hierarchy and UCFGs: Begin: 2024-05-23T11:42:44.454672071Z, End: 2024-05-23T11:42:44.463465020Z, Duration: 00:00:00.008
    Load type hierarchy: Begin: 2024-05-23T11:42:44.455450384Z, End: 2024-05-23T11:42:44.460990158Z, Duration: 00:00:00.005
    Load UCFGs: Begin: 2024-05-23T11:42:44.461942507Z, End: 2024-05-23T11:42:44.462652262Z, Duration: 00:00:00.000
INFO: java security sensor peak memory: 131 MB
INFO: Sensor JavaSecuritySensor [security] (done) | time=31ms
INFO: Sensor CSharpSecuritySensor [security]
INFO: Enabled taint analysis rules: S2076, S2078, S2083, S2091, S2631, S3649, S5131, S5135, S5144, S5145, S5146, S5334, S5883, S6096, S6173, S6287, S6350, S6399, S6639, S6641
INFO: Load type hierarchy and UCFGs: Starting
INFO: Load type hierarchy: Starting
INFO: Reading type hierarchy from: /github/workspace/ucfg2/cs
INFO: Read 0 type definitions
INFO: Load type hierarchy: Time spent was 00:00:00.000
INFO: Load UCFGs: Starting
INFO: Load UCFGs: Time spent was 00:00:00.000
INFO: Load type hierarchy and UCFGs: Time spent was 00:00:00.000
INFO: No UCFGs have been included for analysis.
INFO: csharp security sensor: Time spent was 00:00:00.005
INFO: csharp security sensor: Begin: 2024-05-23T11:42:44.480414371Z, End: 2024-05-23T11:42:44.485462136Z, Duration: 00:00:00.005
  Load type hierarchy and UCFGs: Begin: 2024-05-23T11:42:44.484545465Z, End: 2024-05-23T11:42:44.485139985Z, Duration: 00:00:00.000
    Load type hierarchy: Begin: 2024-05-23T11:42:44.484576563Z, End: 2024-05-23T11:42:44.484806552Z, Duration: 00:00:00.000
    Load UCFGs: Begin: 2024-05-23T11:42:44.484886502Z, End: 2024-05-23T11:42:44.484929081Z, Duration: 00:00:00.000
INFO: csharp security sensor peak memory: 131 MB
INFO: Sensor CSharpSecuritySensor [security] (done) | time=5ms
INFO: Sensor PhpSecuritySensor [security]
INFO: Enabled taint analysis rules: S2076, S2078, S2083, S2091, S2631, S3649, S5131, S5135, S5144, S5145, S5146, S5334, S5335, S5883, S6173, S6287, S6350
INFO: Load type hierarchy and UCFGs: Starting
INFO: Load type hierarchy: Starting
INFO: Reading type hierarchy from: /github/workspace/.scannerwork/ucfg2/php
INFO: Read 0 type definitions
INFO: Load type hierarchy: Time spent was 00:00:00.000
INFO: Load UCFGs: Starting
INFO: Load UCFGs: Time spent was 00:00:00.000
INFO: Load type hierarchy and UCFGs: Time spent was 00:00:00.000
INFO: No UCFGs have been included for analysis.
INFO: php security sensor: Time spent was 00:00:00.004
INFO: php security sensor: Begin: 2024-05-23T11:42:44.486078938Z, End: 2024-05-23T11:42:44.490132958Z, Duration: 00:00:00.004
  Load type hierarchy and UCFGs: Begin: 2024-05-23T11:42:44.486181109Z, End: 2024-05-23T11:42:44.486512057Z, Duration: 00:00:00.000
    Load type hierarchy: Begin: 2024-05-23T11:42:44.486205574Z, End: 2024-05-23T11:42:44.486335437Z, Duration: 00:00:00.000
    Load UCFGs: Begin: 2024-05-23T11:42:44.486410507Z, End: 2024-05-23T11:42:44.486442877Z, Duration: 00:00:00.000
INFO: php security sensor peak memory: 131 MB
INFO: Sensor PhpSecuritySensor [security] (done) | time=7ms
INFO: Sensor PythonSecuritySensor [security]
INFO: Enabled taint analysis rules: S2076, S2078, S2083, S2091, S2631, S3649, S5131, S5135, S5144, S5145, S5146, S5147, S5334, S5496, S6287, S6350, S6639, S6680, S6776, S6839
INFO: Load type hierarchy and UCFGs: Starting
INFO: Load type hierarchy: Starting
INFO: Reading type hierarchy from: /github/workspace/.scannerwork/ucfg2/python
INFO: Read 0 type definitions
INFO: Load type hierarchy: Time spent was 00:00:00.000
INFO: Load UCFGs: Starting
INFO: Load UCFGs: Time spent was 00:00:00.000
INFO: Load type hierarchy and UCFGs: Time spent was 00:00:00.000
INFO: No UCFGs have been included for analysis.
INFO: python security sensor: Time spent was 00:00:00.000
INFO: python security sensor: Begin: 2024-05-23T11:42:44.505285653Z, End: 2024-05-23T11:42:44.506163652Z, Duration: 00:00:00.000
  Load type hierarchy and UCFGs: Begin: 2024-05-23T11:42:44.505449929Z, End: 2024-05-23T11:42:44.505838766Z, Duration: 00:00:00.000
    Load type hierarchy: Begin: 2024-05-23T11:42:44.505477491Z, End: 2024-05-23T11:42:44.505645505Z, Duration: 00:00:00.000
    Load UCFGs: Begin: 2024-05-23T11:42:44.505730874Z, End: 2024-05-23T11:42:44.505764186Z, Duration: 00:00:00.000
INFO: python security sensor peak memory: 131 MB
INFO: Sensor PythonSecuritySensor [security] (done) | time=1ms
INFO: Sensor JsSecuritySensor [security]
INFO: Enabled taint analysis rules: S6105, S3649, S6287, S5146, S5144, S5334, S6096, S2631, S6350, S5131, S2083, S5696, S5883, S2076, S5147
INFO: Load type hierarchy and UCFGs: Starting
INFO: Load type hierarchy: Starting
INFO: Reading type hierarchy from: /github/workspace/.scannerwork/ucfg2/js
INFO: Read 0 type definitions
INFO: Load type hierarchy: Time spent was 00:00:00.003
INFO: Load UCFGs: Starting
INFO: Reading UCFGs from: /github/workspace/.scannerwork/ucfg2/js
INFO: Load UCFGs: Time spent was 00:00:00.868
INFO: Load type hierarchy and UCFGs: Time spent was 00:00:00.872
INFO: Analyzing 800 UCFGs to detect vulnerabilities.
INFO: Check cache: Starting
INFO: Load cache: Starting
INFO: Load cache: Time spent was 00:00:00.000
INFO: Check cache: Time spent was 00:00:00.001
INFO: Create runtime call graph: Starting
INFO: Variable Type Analysis #1: Starting
INFO: Create runtime type propagation graph: Starting
INFO: Create runtime type propagation graph: Time spent was 00:00:00.099
INFO: Run SCC (Tarjan) on 5973 nodes: Starting
INFO: Run SCC (Tarjan) on 5973 nodes: Time spent was 00:00:00.018
INFO: Tarjan found 5973 strongly connected components
INFO: Propagate runtime types to strongly connected components: Starting
INFO: Propagate runtime types to strongly connected components: Time spent was 00:00:00.035
INFO: Variable Type Analysis #1: Time spent was 00:00:00.155
INFO: Variable Type Analysis #2: Starting
INFO: Create runtime type propagation graph: Starting
INFO: Create runtime type propagation graph: Time spent was 00:00:00.114
INFO: Run SCC (Tarjan) on 5973 nodes: Starting
INFO: Run SCC (Tarjan) on 5973 nodes: Time spent was 00:00:00.006
INFO: Tarjan found 5973 strongly connected components
INFO: Propagate runtime types to strongly connected components: Starting
INFO: Propagate runtime types to strongly connected components: Time spent was 00:00:00.012
INFO: Variable Type Analysis #2: Time spent was 00:00:00.134
INFO: Create runtime call graph: Time spent was 00:00:00.294
INFO: Load config: Starting
INFO: Load config: Time spent was 00:00:00.112
INFO: Compute entry points: Starting
INFO: Compute entry points: Time spent was 00:00:00.330
INFO: All rules entry points : 167
INFO: Slice call graph: Starting
INFO: Slice call graph: Time spent was 00:00:00.000
INFO: Live variable analysis: Starting
INFO: Live variable analysis: Time spent was 00:00:00.277
INFO: Taint analysis for js: Starting
INFO: 0 / 800 UCFGs simulated, memory usage: 199 MB
INFO: 174 / 800 UCFGs simulated, memory usage: 168 MB
INFO: Taint analysis for js: Time spent was 00:00:01.806
INFO: Report issues: Starting
INFO: Report issues: Time spent was 00:00:00.004
INFO: Store cache: Starting
INFO: Store cache: Time spent was 00:00:00.003
INFO: js security sensor: Time spent was 00:00:03.712
INFO: js security sensor: Begin: 2024-05-23T11:42:44.506817724Z, End: 2024-05-23T11:42:48.218950355Z, Duration: 00:00:03.712
  Load type hierarchy and UCFGs: Begin: 2024-05-23T11:42:44.507021945Z, End: 2024-05-23T11:42:45.379431523Z, Duration: 00:00:00.872
    Load type hierarchy: Begin: 2024-05-23T11:42:44.507048254Z, End: 2024-05-23T11:42:44.510195932Z, Duration: 00:00:00.003
    Load UCFGs: Begin: 2024-05-23T11:42:44.510262727Z, End: 2024-05-23T11:42:45.378377345Z, Duration: 00:00:00.868
  Check cache: Begin: 2024-05-23T11:42:45.380482105Z, End: 2024-05-23T11:42:45.382154758Z, Duration: 00:00:00.001
    Load cache: Begin: 2024-05-23T11:42:45.380960288Z, End: 2024-05-23T11:42:45.381421048Z, Duration: 00:00:00.000
  Create runtime call graph: Begin: 2024-05-23T11:42:45.382287506Z, End: 2024-05-23T11:42:45.677259195Z, Duration: 00:00:00.294
    Variable Type Analysis #1: Begin: 2024-05-23T11:42:45.383511892Z, End: 2024-05-23T11:42:45.538661804Z, Duration: 00:00:00.155
      Create runtime type propagation graph: Begin: 2024-05-23T11:42:45.384700963Z, End: 2024-05-23T11:42:45.484578835Z, Duration: 00:00:00.099
      Run SCC (Tarjan) on 5973 nodes: Begin: 2024-05-23T11:42:45.485036049Z, End: 2024-05-23T11:42:45.503043955Z, Duration: 00:00:00.018
      Propagate runtime types to strongly connected components: Begin: 2024-05-23T11:42:45.503265950Z, End: 2024-05-23T11:42:45.538489112Z, Duration: 00:00:00.035
    Variable Type Analysis #2: Begin: 2024-05-23T11:42:45.541204001Z, End: 2024-05-23T11:42:45.675766358Z, Duration: 00:00:00.134
      Create runtime type propagation graph: Begin: 2024-05-23T11:42:45.541414194Z, End: 2024-05-23T11:42:45.656147073Z, Duration: 00:00:00.114
      Run SCC (Tarjan) on 5973 nodes: Begin: 2024-05-23T11:42:45.656619455Z, End: 2024-05-23T11:42:45.663069960Z, Duration: 00:00:00.006
      Propagate runtime types to strongly connected components: Begin: 2024-05-23T11:42:45.663453426Z, End: 2024-05-23T11:42:45.675526700Z, Duration: 00:00:00.012
  Load config: Begin: 2024-05-23T11:42:45.677471201Z, End: 2024-05-23T11:42:45.790216878Z, Duration: 00:00:00.112
  Compute entry points: Begin: 2024-05-23T11:42:45.791188482Z, End: 2024-05-23T11:42:46.121839194Z, Duration: 00:00:00.330
  Slice call graph: Begin: 2024-05-23T11:42:46.122478127Z, End: 2024-05-23T11:42:46.122638928Z, Duration: 00:00:00.000
  Live variable analysis: Begin: 2024-05-23T11:42:46.122831117Z, End: 2024-05-23T11:42:46.400751482Z, Duration: 00:00:00.277
  Taint analysis for js: Begin: 2024-05-23T11:42:46.403282558Z, End: 2024-05-23T11:42:48.209567946Z, Duration: 00:00:01.806
  Report issues: Begin: 2024-05-23T11:42:48.209804968Z, End: 2024-05-23T11:42:48.214379560Z, Duration: 00:00:00.004
  Store cache: Begin: 2024-05-23T11:42:48.214612876Z, End: 2024-05-23T11:42:48.217652201Z, Duration: 00:00:00.003
INFO: js security sensor peak memory: 292 MB
INFO: Sensor JsSecuritySensor [security] (done) | time=3718ms
INFO: ------------- Run sensors on project
INFO: Sensor Zero Coverage Sensor
INFO: Sensor Zero Coverage Sensor (done) | time=43ms
INFO: SCM Publisher SCM provider for this project is: git
INFO: SCM Publisher 9 source files to be analyzed
INFO: SCM Publisher 9/9 source files have been analyzed (done) | time=2150ms
INFO: CPD Executor 42 files had no CPD blocks
INFO: CPD Executor Calculating CPD for 124 files
INFO: CPD Executor CPD calculation finished (done) | time=100ms
INFO: Analysis report generated in 264ms, dir size=2 MB
INFO: Analysis report compressed in 665ms, zip size=833 KB
INFO: Analysis report uploaded in 448ms
INFO: ANALYSIS SUCCESSFUL, you can find the results at: https://sonarcloud.io/dashboard?id=token-metrics_tm-airdrop&branch=development
INFO: Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report
INFO: More about the report processing at https://sonarcloud.io/api/ce/task?id=AY-lQtWZwi1Lb_FsRuUJ
INFO: Sensor cache published successfully
INFO: Time spent writing ucfgs 464ms
INFO: Analysis total time: 57.870 s
INFO: ------------------------------------------------------------------------
INFO: EXECUTION SUCCESS
INFO: ------------------------------------------------------------------------
INFO: Total time: 1:03.810s
INFO: Final Memory: 87M/297M
INFO: ------------------------------------------------------------------------

Looks like no coverage files were found.

Have you told the scanner where to look?

@Colin
Yes I did that, this is my sonar-project.properties

# SonarCloud Project
sonar.projectKey=token-metrics_tm-airdrop
sonar.organization=tokenmetrics
sonar.projectName=tm-airdrop
sonar.projectVersion=1.0

# Path to sources
sonar.sources=.
sonar.sourceEncoding=UTF-8

# Path to tests
# sonar.tests=src/tests
# sonar.test.inclusions=**/*.test.ts,**/*.test.tsx

# TypeScript configuration
sonar.javascript.lcov.reportPaths=coverage/lcov.info
sonar.typescript.tsconfigPath=tsconfig.json

# Language patterns
# sonar.lang.patterns.ts=/*.ts,/*.tsx,/*.cts,/*.mts

I commented those parts to match with what’s in Sonar docs, but still not working though

Are you sure the coverage report exists at that location? For example, if you run a cat coverage/lcov.info in your pipeline, do the file contents get printed?

Yeah, it does return output, I’ll add it again then test to confirm again