Skip to content

Commit

Permalink
Merge pull request #359 from josdem/feature/347
Browse files Browse the repository at this point in the history
[small]feature/347
  • Loading branch information
josdem authored Sep 27, 2024
2 parents ef2dc93 + f7a9fbd commit 54eff93
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ env:
DATABASE: vetlog
USER: ${{ secrets.USERNAME }}
PASSWORD: ${{ secrets.PASSWORD }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -28,7 +29,7 @@ jobs:
- name: Set up MySQL
run: ./gradlew -Dflyway.user=$USER -Dflyway.password=$PASSWORD -Dflyway.baselineOnMigrate=true flywayMigrate -i
- name: Build with Gradle
run: ./gradlew -Dflyway.user=$USER -Dflyway.password=$PASSWORD test
run: ./gradlew -Dflyway.user=$USER -Dflyway.password=$PASSWORD test jacocoTestReport sonar
- uses: actions/upload-artifact@v4
with:
name: test-results
Expand Down
16 changes: 14 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ plugins {
id 'org.springframework.boot' version '3.3.4'
id 'io.spring.dependency-management' version '1.1.6'
id 'org.flywaydb.flyway' version '10.18.0'
id "org.sonarqube" version "3.3"
id 'org.sonarqube' version '5.1.0.4882'
id 'jacoco'
id 'java'
id 'com.diffplug.spotless' version '6.25.0'
Expand Down Expand Up @@ -41,6 +41,14 @@ flyway {
url = 'jdbc:mysql://localhost:3306/vetlog'
}

sonar {
properties {
property "sonar.projectKey", "josdem_vetlog-spring-boot"
property "sonar.organization", "josdem-io"
property "sonar.host.url", "https://sonarcloud.io"
}
}

spotless {
java {
target fileTree('.') {
Expand Down Expand Up @@ -83,9 +91,13 @@ dependencies {
testImplementation "org.mockito:mockito-inline:$mockitoInlineVersion"
}

jacoco {
toolVersion = "0.8.11"
}

jacocoTestReport {
reports {
html.destination file("${buildDir}/jacocoHtml")
xml.required = true
}
}

Expand Down
1 change: 0 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
systemProp.sonar.host.url=https://sonar.josdem.io

0 comments on commit 54eff93

Please sign in to comment.