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
41 changes: 41 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: CI

on:
push:
branches:
- main
paths-ignore:
- 'docs/**'
pull_request:
branches:
- main
paths-ignore:
- 'docs/**'

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.2

- name: Set up JDK 17
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4.5.0
with:
java-version: '17'
distribution: 'temurin'
cache: 'maven'

- name: Build and verify with Maven
run: mvn -B clean verify -Pci

- name: Upload test results
if: always()
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
with:
name: test-results
path: |
**/target/surefire-reports/*.xml
**/target/site/
retention-days: 7
107 changes: 82 additions & 25 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
<artifactId>ini4j</artifactId>
<version>0.6.0-SNAPSHOT</version>
<name>ini4j</name>
<description>Java API for handling configuration files in Windows .ini format.</description>
<description>Java API for handling configuration files in Windows .ini
format.</description>
<packaging>jar</packaging>
<url>https://github.com/ini4j/ini4j</url>

Expand Down Expand Up @@ -69,6 +70,12 @@
<version>2.0b4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-annotations</artifactId>
<version>4.8.6</version>
<scope>provided</scope>
</dependency>
</dependencies>

<build>
Expand All @@ -84,20 +91,11 @@
<artifactId>maven-surefire-plugin</artifactId>
<version>3.2.5</version>
<configuration>
<systemProperties>
<property>
<name>java.util.prefs.PreferencesFactory</name>
<value>org.ini4j.IniPreferencesFactory</value>
</property>
<property>
<name>org.ini4j.prefs.user</name>
<value>org/ini4j/sample/dwarfs.ini</value>
</property>
<property>
<name>org.ini4j.prefs.system</name>
<value>org/ini4j/sample/dwarfs.ini</value>
</property>
</systemProperties>
<systemPropertyVariables>
<java.util.prefs.PreferencesFactory>org.ini4j.IniPreferencesFactory</java.util.prefs.PreferencesFactory>
<org.ini4j.prefs.user>org/ini4j/sample/dwarfs.ini</org.ini4j.prefs.user>
<org.ini4j.prefs.system>org/ini4j/sample/dwarfs.ini</org.ini4j.prefs.system>
</systemPropertyVariables>
</configuration>
</plugin>

Expand Down Expand Up @@ -171,15 +169,23 @@
<reflowLongStrings>true</reflowLongStrings>
</googleJavaFormat>
</java>
<xml>
<includes>
<include>pom.xml</include>
<include>src/**/*.xml</include>
</includes>
<eclipseWtp>
<type>XML</type>
</eclipseWtp>
</xml>
<formats>
<format>
<includes>
<include>pom.xml</include>
<include>src/**/*.xml</include>
</includes>
<eclipseWtp>
<type>XML</type>
<version>4.21.0</version>
</eclipseWtp>
<indent>
<spaces>true</spaces>
</indent>
<trimTrailingWhitespace />
<endWithNewline />
</format>
</formats>
</configuration>
<executions>
<execution>
Expand Down Expand Up @@ -209,4 +215,55 @@
</testResource>
</testResources>
</build>
</project>
<profiles>
<profile>
<id>ci</id>
<build>
<plugins>
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<version>4.9.8.2</version>
<executions>
<execution>
<id>spotbugs-check</id>
<phase>verify</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
<configuration>
<effort>Max</effort>
<threshold>Medium</threshold>
<failOnError>true</failOnError>
<xmlOutput>true</xmlOutput>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>3.28.0</version>
<executions>
<execution>
<id>pmd-check</id>
<phase>verify</phase>
<goals>
<goal>check</goal>
<goal>cpd-check</goal>
</goals>
</execution>
</executions>
<configuration>
<failOnViolation>true</failOnViolation>
<printFailingErrors>true</printFailingErrors>
<linkXRef>false</linkXRef>
<minimumTokens>150</minimumTokens>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
Loading
Loading