Hi,
I have a Vue + Typescript app hosted at Github with analysis triggered from a GitHub action.
After several analyses I keep getting the message " The main branch has no lines of code." on the overview tab, even though I can see code coverage stats and can view the code from the measures and code tabs.
Pull requests work 100% in that it shows results on the overview tab.
I’ve tried recreating the project in sonarsource and forcing a new push directly into master with no change in outcome.
I’m using Sonarcloud. Here is my sonar-project.properties:
sonar.organization=my_org
sonar.projectKey=my_project
sonar.sources=.
sonar.inclusions=pages/**/*.vue,components/**/*.vue
sonar.language=ts,vue
sonar.tests=test
sonar.testExecutionReportPaths=coverage/test-reporter.xml
sonar.javascript.lcov.reportPaths=coverage/lcov.info
sonar.sourceEncoding=UTF-8
and the github actions workflow:
on:
# Trigger analysis when pushing in master or pull requests, and when creating
# a pull request.
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened]
name: Main Workflow
jobs:
sonarcloud:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Get master
run: git fetch origin master
- name: Install dependencies
uses: borales/actions-yarn@v2.0.0
with:
cmd: install
- name: Run test
uses: borales/actions-yarn@v2.0.0
with:
cmd: test
- name: SonarCloud Scan
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
Thanks,
Brendan