Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move sonarcloud analysis #39

Merged
merged 6 commits into from
Jul 26, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 31 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,6 @@ jobs:
- name: Gradle check
run: ./gradlew check jacocoTestReport

- name: SonarCloud analyze
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: ./gradlew sonar --info

- name: Generate coverage badge
uses: cicirello/jacoco-badge-generator@v2
with:
Expand All @@ -56,6 +50,37 @@ jobs:
with:
path: './.github/badges'

sonar-cloud:
runs-on: ubuntu-latest
needs: build-gradle

steps:
- name: Git checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- uses: actions/download-artifact@v3
with:
name: build-output

- name: Setup java
uses: actions/setup-java@v3
with:
distribution: corretto
java-version: 17

- name: Setup Gradle
uses: gradle/gradle-build-action@v2
with:
gradle-version: 8.2.1

- name: SonarCloud analyze
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: ./gradlew sonar --info

deploy-gh-pages:
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
Expand Down