Skip to content

Commit

Permalink
fix(deps): update all minor dependencies (v2-main) (#269)
Browse files Browse the repository at this point in the history
  • Loading branch information
renovate[bot] authored Dec 10, 2024
1 parent 0c69659 commit cec8163
Show file tree
Hide file tree
Showing 5 changed files with 85 additions and 18 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
- 'src/**'
- 'pom.xml'

env:
JAVA_VERSION: '17'

jobs:
check-version:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -93,7 +96,7 @@ jobs:
- name: Set up Maven Central Repository
uses: actions/setup-java@v4
with:
java-version: 11
java-version: ${{ env.JAVA_VERSION }}
distribution: adopt
server-id: ossrh
server-username: MAVEN_USERNAME
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/create-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
pull_request:
types: [opened, edited, synchronize, reopened, labeled]

env:
JAVA_VERSION: '17'

jobs:
# begin the snapshot verification before deployment
check-version:
Expand Down Expand Up @@ -47,11 +50,11 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Set up JDK 11
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: "11"
java-version: ${{ env.JAVA_VERSION }}

- name: Tests
run: mvn test --no-transfer-progress
Expand Down Expand Up @@ -79,7 +82,7 @@ jobs:
- name: Set up Maven Central Repository
uses: actions/setup-java@v4
with:
java-version: 11
java-version: ${{ env.JAVA_VERSION }}
distribution: adopt
server-id: ossrh
server-username: MAVEN_USERNAME
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,21 @@ on:
pull_request:
types: [opened, edited, synchronize, reopened]

env:
JAVA_VERSION: '17'

jobs:
test:
if: ${{ ! contains(github.event.pull_request.labels.*.name, 'deploy-snapshot') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up JDK 11
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: "11"
java-version: ${{ env.JAVA_VERSION }}

- name: Tests
run: mvn test --no-transfer-progress
24 changes: 12 additions & 12 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>fr.insee.lunatic</groupId>
<artifactId>lunatic-model</artifactId>
<version>2.6.4</version>
<version>2.7.0</version>
<packaging>jar</packaging>

<name>Lunatic Model</name>
Expand All @@ -20,9 +20,9 @@
<!-- Build properties -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven.compiler.release>11</maven.compiler.release>
<maven.compiler.release>17</maven.compiler.release>
<!-- Version properties -->
<saxon.version>12.4</saxon.version>
<saxon.version>12.5</saxon.version>
</properties>

<licenses>
Expand Down Expand Up @@ -66,7 +66,7 @@
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>eclipselink</artifactId>
<version>4.0.3</version>
<version>4.0.4</version>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
Expand All @@ -89,17 +89,17 @@
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.16.1</version>
<version>2.18.0</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>2.0.13</version>
<version>2.0.16</version>
</dependency>

<dependency>
<groupId>org.xmlunit</groupId>
<artifactId>xmlunit-matchers</artifactId>
<artifactId>xmlunit-assertj3</artifactId>
<version>2.10.0</version>
<scope>test</scope>
</dependency>
Expand All @@ -118,7 +118,7 @@
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<version>2.23.1</version>
<version>2.24.2</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -129,7 +129,7 @@
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>5.10.2</version>
<version>5.11.3</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand All @@ -155,7 +155,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.3.1</version>
<version>3.5.2</version>
<configuration>
<encoding>UTF-8</encoding>
<argLine>-Dfile.encoding=UTF-8
Expand Down Expand Up @@ -305,7 +305,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.8.0</version>
<version>3.11.2</version>
<executions>
<execution>
<id>attach-javadocs</id>
Expand All @@ -330,7 +330,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.2.4</version>
<version>3.2.7</version>
<executions>
<execution>
<id>sign-artifacts</id>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
package fr.insee.lunatic.conversion.data;

import org.junit.jupiter.api.Test;
import org.xmlunit.assertj3.XmlAssert;

class JsonToXmlDataTest {

/**
* Lunatic bug: in some cases pairwise data can be inconsistent.
* Yet the data conversion shouldn't fail so as not to break the data extraction of client collection tools
* that uses the json to xml conversion.
*/
@Test
void convertInconsistentPairwiseData() throws Exception {
// Given
String jsonInconsistentData = """
{
"COLLECTED": {
"LIENS_MISSING": {
"COLLECTED": [
null,
[null, null]
]
}
},
"CALCULATED": {},
"EXTERNAL": {
"FOO_EXTERNAL": "some value"
}
}""";
// When
JSONLunaticDataToXML converter = new JSONLunaticDataToXML();
String result = converter.transform(jsonInconsistentData);
// Then
String expected = """
<?xml version="1.0" encoding="UTF-8"?>
<Data>
<COLLECTED>
<LIENS_MISSING>
<COLLECTED>
<COLLECTED type="null"/>
<COLLECTED>
<COLLECTED type="null"/>
<COLLECTED type="null"/>
</COLLECTED>
</COLLECTED>
</LIENS_MISSING>
</COLLECTED>
<CALCULATED/>
<EXTERNAL>
<FOO_EXTERNAL type="string">some value</FOO_EXTERNAL>
</EXTERNAL>
</Data>
""";
XmlAssert.assertThat(expected).and(result).ignoreWhitespace().areIdentical();
}

}

0 comments on commit cec8163

Please sign in to comment.