Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
ad751e6c72 |
18
.github/workflows/ci.yaml
vendored
18
.github/workflows/ci.yaml
vendored
@ -1,11 +1,13 @@
|
|||||||
name: CI
|
name: CI
|
||||||
on: [ push ]
|
on: [ push, pull_request ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
env:
|
env:
|
||||||
REPO: ${{ github.event.repository.name }}
|
REPO: ${{ github.event.repository.name }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
pull-requests: write
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository code
|
- name: Check out repository code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@ -14,13 +16,25 @@ jobs:
|
|||||||
uses: actions/setup-java@v4
|
uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
distribution: 'zulu'
|
distribution: 'zulu'
|
||||||
java-version: '21'
|
java-version: '17'
|
||||||
|
|
||||||
- name: Build Runner
|
- name: Build Runner
|
||||||
run: ./mvnw --no-transfer-progress clean verify -Pnative -Dquarkus.native.remote-container-build=true
|
run: ./mvnw --no-transfer-progress clean verify -Pnative -Dquarkus.native.remote-container-build=true
|
||||||
|
|
||||||
|
- name: Add coverage to PR
|
||||||
|
id: jacoco
|
||||||
|
uses: madrapps/jacoco-report@v1.7.1
|
||||||
|
with:
|
||||||
|
paths: ${{ github.workspace }}/**/target/coverage/jacoco.xml
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
min-coverage-overall: 40
|
||||||
|
min-coverage-changed-files: 60
|
||||||
|
title: ${{ env.REPO }} Coverage
|
||||||
|
|
||||||
- name: Build Container
|
- name: Build Container
|
||||||
|
if: github.ref_name == 'main'
|
||||||
run: docker build -f src/main/docker/Dockerfile.native-micro -t ${{ env.REPO }} .
|
run: docker build -f src/main/docker/Dockerfile.native-micro -t ${{ env.REPO }} .
|
||||||
|
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
|
if: github.ref_name == 'main'
|
||||||
run: "docker compose up -d"
|
run: "docker compose up -d"
|
||||||
|
6
.gitignore
vendored
6
.gitignore
vendored
@ -1,9 +1,5 @@
|
|||||||
*~
|
*~
|
||||||
|
|
||||||
searxng-docker.service
|
|
||||||
caddy
|
|
||||||
srv
|
|
||||||
searxng/uwsgi.ini
|
|
||||||
|
|
||||||
.idea
|
.idea
|
||||||
target
|
target
|
||||||
|
pom.xml.versionsBackup
|
||||||
|
55
pom.xml
55
pom.xml
@ -14,9 +14,10 @@
|
|||||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||||
<quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id>
|
<quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id>
|
||||||
<quarkus.platform.group-id>io.quarkus.platform</quarkus.platform.group-id>
|
<quarkus.platform.group-id>io.quarkus.platform</quarkus.platform.group-id>
|
||||||
<quarkus.platform.version>3.15.1</quarkus.platform.version>
|
<quarkus.platform.version>3.16.0.CR1</quarkus.platform.version>
|
||||||
<skipITs>true</skipITs>
|
<skipITs>true</skipITs>
|
||||||
<surefire-plugin.version>3.3.1</surefire-plugin.version>
|
<surefire-plugin.version>3.5.1</surefire-plugin.version>
|
||||||
|
<jacoco.version>0.8.12</jacoco.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencyManagement>
|
<dependencyManagement>
|
||||||
@ -74,6 +75,11 @@
|
|||||||
<version>${kotlin.version}</version>
|
<version>${kotlin.version}</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.quarkus</groupId>
|
||||||
|
<artifactId>quarkus-jacoco</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
@ -109,6 +115,11 @@
|
|||||||
<configuration>
|
<configuration>
|
||||||
<systemPropertyVariables>
|
<systemPropertyVariables>
|
||||||
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
|
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
|
||||||
|
<quarkus.jacoco.data-file>${maven.multiModuleProjectDirectory}/target/jacoco.exec
|
||||||
|
</quarkus.jacoco.data-file>
|
||||||
|
<quarkus.jacoco.reuse-data-file>true</quarkus.jacoco.reuse-data-file>
|
||||||
|
<quarkus.jacoco.report-location>${maven.multiModuleProjectDirectory}/target/coverage
|
||||||
|
</quarkus.jacoco.report-location>
|
||||||
<maven.home>${maven.home}</maven.home>
|
<maven.home>${maven.home}</maven.home>
|
||||||
</systemPropertyVariables>
|
</systemPropertyVariables>
|
||||||
</configuration>
|
</configuration>
|
||||||
@ -130,9 +141,49 @@
|
|||||||
</native.image.path>
|
</native.image.path>
|
||||||
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
|
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
|
||||||
<maven.home>${maven.home}</maven.home>
|
<maven.home>${maven.home}</maven.home>
|
||||||
|
<quarkus.test.arg-line>${argLine}</quarkus.test.arg-line>
|
||||||
</systemPropertyVariables>
|
</systemPropertyVariables>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.jacoco</groupId>
|
||||||
|
<artifactId>jacoco-maven-plugin</artifactId>
|
||||||
|
<version>${jacoco.version}</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>default-prepare-agent</id>
|
||||||
|
<goals>
|
||||||
|
<goal>prepare-agent</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<exclClassLoaders>*QuarkusClassLoader</exclClassLoaders>
|
||||||
|
<destFile>${project.build.directory}/jacoco-quarkus.exec</destFile>
|
||||||
|
<append>true</append>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
<execution>
|
||||||
|
<id>default-prepare-agent-integration</id>
|
||||||
|
<goals>
|
||||||
|
<goal>prepare-agent-integration</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<destFile>${project.build.directory}/jacoco-quarkus.exec</destFile>
|
||||||
|
<append>true</append>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
<execution>
|
||||||
|
<id>report</id>
|
||||||
|
<phase>post-integration-test</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>report</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<dataFile>${project.build.directory}/jacoco-quarkus.exec</dataFile>
|
||||||
|
<outputDirectory>${project.build.directory}/jacoco-report</outputDirectory>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.jetbrains.kotlin</groupId>
|
<groupId>org.jetbrains.kotlin</groupId>
|
||||||
<artifactId>kotlin-maven-plugin</artifactId>
|
<artifactId>kotlin-maven-plugin</artifactId>
|
||||||
|
@ -0,0 +1,27 @@
|
|||||||
|
package de.arindy.mythodea.api
|
||||||
|
|
||||||
|
import io.quarkus.test.junit.QuarkusTest
|
||||||
|
import io.restassured.RestAssured.given
|
||||||
|
import org.hamcrest.Matchers.`is`
|
||||||
|
import org.junit.jupiter.api.Test
|
||||||
|
import java.time.Instant
|
||||||
|
|
||||||
|
@QuarkusTest
|
||||||
|
class MythodeaDateResourceTest {
|
||||||
|
|
||||||
|
@Test
|
||||||
|
fun testFromEndpoint() {
|
||||||
|
given().`when`()
|
||||||
|
.queryParams(
|
||||||
|
"epochMillis", Instant.parse("2024-10-23T00:00:00+01:00").toEpochMilli()
|
||||||
|
).get("/date/from/")
|
||||||
|
.then()
|
||||||
|
.statusCode(200)
|
||||||
|
.body("dayString", `is`("3. Mahntag"))
|
||||||
|
.body("monthString", `is`("Holzmond"))
|
||||||
|
.body("year", `is`(22))
|
||||||
|
.body("yearNDE", `is`(23))
|
||||||
|
.body("yearNDK", `is`(3))
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user