PMT-3: Add CI with Linting
Some checks failed
Quality Check / Linting Check (push) Failing after 42s
Some checks failed
Quality Check / Linting Check (push) Failing after 42s
This commit is contained in:
parent
47ddf4158a
commit
da876e7823
5 changed files with 54 additions and 3 deletions
21
.gitea/workflows/qs.yml
Normal file
21
.gitea/workflows/qs.yml
Normal file
|
@ -0,0 +1,21 @@
|
|||
name: "Quality Check"
|
||||
|
||||
on:
|
||||
- push
|
||||
- pull_request
|
||||
|
||||
jobs:
|
||||
linting:
|
||||
name: "Linting Check"
|
||||
runs-on: "ubuntu-latest"
|
||||
container:
|
||||
image: "git.euph.dev/actions/runner-java-21:latest"
|
||||
steps:
|
||||
- name: "Checkout"
|
||||
uses: "https://git.euph.dev/actions/checkout@v3"
|
||||
- name: "Prepare Gradle"
|
||||
run: gradle clean
|
||||
- name: "Checkstyle Linting Main"
|
||||
run: gradle checkstyleMain
|
||||
- name: "Checkstyle Linting Test"
|
||||
run: gradle checkstyleTest
|
|
@ -6,11 +6,17 @@ repositories {
|
|||
|
||||
plugins {
|
||||
java
|
||||
checkstyle
|
||||
id("org.springframework.boot") version "3.3.3"
|
||||
id("io.spring.dependency-management") version "1.1.6"
|
||||
id("org.hidetake.swagger.generator") version "2.19.2"
|
||||
}
|
||||
|
||||
checkstyle {
|
||||
toolVersion = "10.12.4"
|
||||
configFile = file("src/main/resources/checkstyle.xml")
|
||||
}
|
||||
|
||||
group = "de.hmmh"
|
||||
version = "0.0.1-SNAPSHOT"
|
||||
|
||||
|
@ -73,9 +79,14 @@ tasks {
|
|||
named("compileJava").configure {
|
||||
dependsOn(swaggerSources.getByName("pmt").code)
|
||||
}
|
||||
withType<Checkstyle> {
|
||||
reports {
|
||||
xml.required.set(true)
|
||||
html.required.set(false)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
java.srcDir("${swaggerSources.getByName("pmt").code.outputDir}/src/main/java")
|
||||
|
|
19
src/main/resources/checkstyle.xml
Normal file
19
src/main/resources/checkstyle.xml
Normal file
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE module PUBLIC
|
||||
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
|
||||
"https://checkstyle.org/dtds/configuration_1_3.dtd"
|
||||
>
|
||||
<module name="Checker">
|
||||
<property name="severity" value="error"/>
|
||||
<property name="tabWidth" value="4"/>
|
||||
|
||||
<module name="LineLength">
|
||||
<property name="max" value="120"/>
|
||||
</module>
|
||||
<module name="FileTabCharacter">
|
||||
<property name="eachLine" value="true"/>
|
||||
</module>
|
||||
|
||||
<module name="NewlineAtEndOfFile"/>
|
||||
|
||||
</module>
|
|
@ -23,4 +23,4 @@ public abstract class IntegrationTest {
|
|||
void setUp() {
|
||||
//repository.deleteAll();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,4 +25,4 @@ public class PostgresContextInitializer implements ApplicationContextInitializer
|
|||
"spring.datasource.password=" + postgres.getPassword()
|
||||
).applyTo(configurableApplicationContext.getEnvironment());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue