Skip to content

Commit

Permalink
#876 - Upgrade to Java 21 and SB 3.2.0-RC2
Browse files Browse the repository at this point in the history
  • Loading branch information
rajadilipkolli committed Nov 16, 2023
1 parent 85f3e7a commit 2d63f4c
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 23 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/boot-api-archunit-sample.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ jobs:
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis

- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/[email protected]
with:
java-version: 17
distribution: "zulu"
java-version: 21
distribution: "microsoft"
cache: "maven"

- name: Build and analyze
Expand Down
25 changes: 23 additions & 2 deletions boot-api-archunit-sample/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.1.5</version>
<version>3.2.0-RC2</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.example.archunit</groupId>
Expand All @@ -20,7 +20,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

<java.version>17</java.version>
<java.version>21</java.version>
<springdoc-openapi.version>2.2.0</springdoc-openapi.version>
<archunit.version>1.2.0</archunit.version>

Expand Down Expand Up @@ -333,4 +333,25 @@
</plugins>
</build>

<repositories>
<repository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>

</project>

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
package com.example.archunit;

import static org.assertj.core.api.Assertions.assertThat;

import com.example.archunit.common.ContainersConfig;
import com.zaxxer.hikari.HikariDataSource;
import javax.sql.DataSource;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest;
import org.springframework.context.annotation.Import;

@DataJpaTest(
properties = {
"spring.jpa.hibernate.ddl-auto=validate",
"spring.test.database.replace=none",
"spring.datasource.url=jdbc:tc:postgresql:16.0-alpine:///db"
})
@DataJpaTest(properties = {"spring.jpa.hibernate.ddl-auto=validate", "spring.test.database.replace=none"})
@Import(ContainersConfig.class)
class SchemaValidationTest {

@Autowired
private DataSource dataSource;

@Test
void validateJpaMappingsWithDbSchema() {}
void validateJpaMappingsWithDbSchema() {
assertThat(dataSource).isInstanceOf(HikariDataSource.class);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ public class ContainersConfig {
@Bean
@ServiceConnection
PostgreSQLContainer<?> postgreSQLContainer() {
return new PostgreSQLContainer<>(DockerImageName.parse("postgres:16.0-alpine"));
return new PostgreSQLContainer<>(DockerImageName.parse("postgres:16.1-alpine"));
}
}

0 comments on commit 2d63f4c

Please sign in to comment.