Skip to content
Merged
Show file tree
Hide file tree
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
42 changes: 41 additions & 1 deletion .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
with:
java-version: '17'
distribution: 'zulu'
cache: 'gradle'

- name: Cache SonarQube packages
uses: actions/cache@v4
Expand All @@ -39,7 +40,7 @@ jobs:
- name: Build & Test with Gradle
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: ./gradlew build sonar -Ddb=all
run: ./gradlew check sonar

- name: Upload Test Report
uses: actions/upload-artifact@v4
Expand All @@ -60,6 +61,7 @@ jobs:
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
check_name: Unit Tests
files: |
**/build/test-results/*/TEST-*.xml

Expand All @@ -71,3 +73,41 @@ jobs:
build/reports/kover/report.xml
title: Code Coverage
update-comment: true
integration-test:
name: Integration tests
runs-on: ubuntu-latest
needs:
- build
strategy:
matrix:
db: [ POSTGRESQL, MYSQL, SQLITE, MSSQLSERVER, ORACLE ]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'zulu'
cache: 'gradle'

- name: Integration tests
run: ./gradlew integrationTest -Ddb=${{ matrix.db }}

- name: Upload Test Report
uses: actions/upload-artifact@v4
if: always() # always run even if the previous step fails
with:
name: ${{ matrix.db }}-test-results
path: '**/build/test-results/integrationTest/TEST-*.xml'
retention-days: 1

- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
check_name: ${{ matrix.db }} Integration Tests
files: |
**/build/test-results/integrationTest/TEST-*.xml
14 changes: 7 additions & 7 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,6 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
dependency-caching: true

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
Expand All @@ -40,8 +34,14 @@ jobs:
- name: Setup Gradle
uses: gradle/actions/setup-gradle@06832c7b30a0129d7fb559bcc6e43d26f6374244 # v4.3.1

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
dependency-caching: true

- name: Autobuild
run: ./gradlew assemble
run: ./gradlew assemble --no-build-cache

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ This is the philosophy behind Kapper...</p>
Kapper is a lightweight, Dapper-inspired ORM (Object-Relational Mapping) library written in Kotlin, targeting the JVM ecosystem.
It embraces SQL rather than abstracting it away, providing a simple, intuitive API for executing queries and mapping results.

![Postgres](https://img.shields.io/badge/postgres-%23316192.svg?style=for-the-badge&logo=postgresql&logoColor=white)
![MySQL](https://img.shields.io/badge/mysql-4479A1.svg?style=for-the-badge&logo=mysql&logoColor=white)
![SQLite](https://img.shields.io/badge/sqlite-%2307405e.svg?style=for-the-badge&logo=sqlite&logoColor=white)
![Oracle](https://img.shields.io/badge/oracle-F80000.svg?style=for-the-badge&logo=oracle&logoColor=white)
![MSSQL](https://img.shields.io/badge/mssql-%23CC2927.svg?style=for-the-badge&logo=microsoftsqlserver&logoColor=white)


## The Kapper Philosophy

Instead of adding another abstraction layer, Kapper embraces three core principles:
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ subprojects {
version = projectVersion
}

tasks.build {
tasks.check {
dependsOn(":koverHtmlReport")
dependsOn(":koverXmlReport")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ tasks.named<Test>("test") {

tasks.check {
dependsOn(tasks.ktlintCheck)
dependsOn("integrationTest")
dependsOn(tasks.koverVerify)
}

Expand Down
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
org.jetbrains.dokka.experimental.gradle.pluginMode=V2Enabled
org.jetbrains.dokka.experimental.gradle.pluginMode.noWarn=true
org.gradle.caching=true