Skip to content

Commit

Permalink
Merge pull request #830 from eclipse/sonar
Browse files Browse the repository at this point in the history
java analysis overwrites typescript analysis
  • Loading branch information
amvanbaren authored Nov 15, 2023
2 parents 4ef1499 + eae1d10 commit efe09aa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 20 deletions.
23 changes: 4 additions & 19 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,36 +29,21 @@ jobs:
corepack enable
corepack prepare yarn@stable --activate
- uses: actions/checkout@v2
with:
fetch-depth: 0 # Sonar needs blame info
- name: Set Image Version
run: echo "IMAGE_VERSION=${GITHUB_SHA:0:7}" >> $GITHUB_ENV
- name: SonarCloud Scan webui, cli
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- name: Build CLI
run: yarn --cwd cli
- name: Build Web UI Image
run: docker build -t $WEBUI_TAG:$IMAGE_VERSION webui
- name: Run Server Tests
run: server/gradlew --no-daemon -p server check
- name: Cache SonarCloud packages
uses: actions/cache@v3
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Cache Gradle packages
uses: actions/cache@v3
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: SonarCloud Scan server
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: server/gradlew --no-daemon -p server build sonar --info
- name: Build Server Image
run: docker build -t $SERVER_TAG:$IMAGE_VERSION server
- name: Push Docker Images
Expand Down
4 changes: 3 additions & 1 deletion sonar-project.properties
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
sonar.projectKey=open-vsx_openvsx
sonar.organization=open-vsx
sonar.java.binaries=server/build/classes/java/main
sonar.java.test.binaries=server/build/classes/java/test

# This is the name and version displayed in the SonarCloud UI.
#sonar.projectName=openvsx
#sonar.projectVersion=1.0

# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
sonar.sources=cli,webui
#sonar.sources=.

# Encoding of the source code. Default is default system encoding
#sonar.sourceEncoding=UTF-8

0 comments on commit efe09aa

Please sign in to comment.