mirror of
https://github.com/songoda/SongodaCore.git
synced 2024-11-30 14:03:23 +01:00
00789921a3
This reverts commit 59f4adfc6f
.
We need the tests to generate the test coverage report. Didn't think of that.
45 lines
1.0 KiB
YAML
45 lines
1.0 KiB
YAML
name: SonarCloud
|
|
|
|
on:
|
|
push:
|
|
branches: [ master, development, development-v3 ]
|
|
pull_request:
|
|
types: [ opened, synchronize, reopened ]
|
|
|
|
permissions: read-all
|
|
|
|
env:
|
|
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
|
SONAR_PROJECT_KEY: songoda_SongodaCore
|
|
|
|
jobs:
|
|
Analyze:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
if: ${{ env.SONAR_TOKEN != null }}
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Prepare Workspace
|
|
if: ${{ env.SONAR_TOKEN != null }}
|
|
uses: ./.github/actions/setup_project_workspace
|
|
|
|
- name: 'Cache: SonarCloud'
|
|
if: ${{ env.SONAR_TOKEN != null }}
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: ~/.sonar/cache
|
|
key: ${{ runner.os }}-sonar
|
|
|
|
- name: Analyze project
|
|
if: ${{ env.SONAR_TOKEN != null }}
|
|
run: >
|
|
mvn -B \
|
|
verify \
|
|
org.sonarsource.scanner.maven:sonar-maven-plugin:sonar \
|
|
"-Dsonar.projectKey=$SONAR_PROJECT_KEY"
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|