Codacy integration (#87)
This commit is contained in:
25
.github/workflows/pr_checks.yml
vendored
25
.github/workflows/pr_checks.yml
vendored
@ -37,3 +37,28 @@ jobs:
|
||||
run: ./gradlew assemble
|
||||
- name: Run Unit Tests
|
||||
run: ./gradlew test
|
||||
- name: Cache Coverage Results
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ./**/build/reports/jacoco
|
||||
key: ${{ runner.os }}-unit-${{ env.GITHUB_SHA }}
|
||||
upload-code-coverage:
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- unit
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Cache Coverage Results
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ./**/build/reports/jacoco
|
||||
key: ${{ runner.os }}-unit-${{ env.GITHUB_SHA }}
|
||||
- name: Cache Coverage Results
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ./**/build/reports/jacoco
|
||||
key: ${{ runner.os }}-integration-${{ env.GITHUB_SHA }}
|
||||
- name: Publish code coverage to Codacy
|
||||
uses: codacy/codacy-coverage-reporter-action@v1
|
||||
with:
|
||||
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
|
||||
|
20
.github/workflows/publish.yml
vendored
20
.github/workflows/publish.yml
vendored
@ -24,3 +24,23 @@ jobs:
|
||||
run: ./gradlew publishAllPublicationsToGithubPackagesRepository
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
code-coverage:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-java@v2
|
||||
with:
|
||||
distribution: 'adopt'
|
||||
java-version: '11'
|
||||
- name: Cache Gradle packages
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.gradle/caches
|
||||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle.kts') }}
|
||||
restore-keys: ${{ runner.os }}-gradle
|
||||
- name: Run Unit Tests
|
||||
run: ./gradlew test
|
||||
- name: Publish code coverage to Codacy
|
||||
uses: codacy/codacy-coverage-reporter-action@v1
|
||||
with:
|
||||
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
|
||||
|
@ -1,5 +1,11 @@
|
||||
# Changelog
|
||||
|
||||
## [1.8.1] - October 4th, 2021
|
||||
|
||||
### Added
|
||||
|
||||
- Codacy integration
|
||||
|
||||
## [1.8.0] - October 4th, 2021
|
||||
|
||||
### Changed
|
||||
|
@ -30,6 +30,7 @@ allprojects {
|
||||
apply(plugin = "io.gitlab.arturbosch.detekt")
|
||||
apply(plugin = "com.adarshr.test-logger")
|
||||
apply(plugin = "idea")
|
||||
apply(plugin = "jacoco")
|
||||
|
||||
tasks.withType<KotlinCompile>().configureEach {
|
||||
kotlinOptions {
|
||||
@ -37,6 +38,21 @@ allprojects {
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType<Test>() {
|
||||
finalizedBy(tasks.withType(JacocoReport::class))
|
||||
}
|
||||
|
||||
tasks.withType<JacocoReport>() {
|
||||
reports {
|
||||
html.required.set(true)
|
||||
xml.required.set(true)
|
||||
}
|
||||
}
|
||||
|
||||
configure<JacocoPluginExtension> {
|
||||
toolVersion = "0.8.7"
|
||||
}
|
||||
|
||||
configure<TestLoggerExtension> {
|
||||
theme = ThemeType.MOCHA
|
||||
setLogLevel("lifecycle")
|
||||
|
@ -1,5 +1,5 @@
|
||||
# Kompendium
|
||||
project.version=1.8.0
|
||||
project.version=1.8.1
|
||||
# Kotlin
|
||||
kotlin.code.style=official
|
||||
# Gradle
|
||||
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,5 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
@ -1,4 +1,5 @@
|
||||
rootProject.name = "kompendium"
|
||||
|
||||
include("kompendium-core")
|
||||
include("kompendium-auth")
|
||||
include("kompendium-swagger-ui")
|
||||
|
Reference in New Issue
Block a user