Skip to content

Commit

Permalink
Update dependencies and PostgreSQL (#343)
Browse files Browse the repository at this point in the history
* Next development iteration v.0.10.4

* Update dependencies

* Update PostgreSQL version
  • Loading branch information
mfvanek committed Jan 27, 2024
1 parent 99e22aa commit 0355469
Show file tree
Hide file tree
Showing 11 changed files with 22 additions and 21 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
build:
strategy:
matrix:
pg_version: [ "12.16", "13.12", "14.9", "15.4", "16.0" ]
pg_version: [ "12.17", "13.13", "14.10", "15.5", "16.1" ]
env:
TEST_PG_VERSION: ${{ matrix.pg_version }}
runs-on: ubuntu-latest
Expand Down Expand Up @@ -42,16 +42,16 @@ jobs:
restore-keys: |
${{ runner.os }}-gradle-
- name: Build with Gradle and analyze
if: matrix.pg_version == '14.9'
if: matrix.pg_version == '14.10'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: ./gradlew build sonarqube --info
- name: Build with Gradle
if: matrix.pg_version != '14.9'
if: matrix.pg_version != '14.10'
run: ./gradlew build
- name: Upload coverage to Codecov
if: matrix.pg_version == '14.9'
if: matrix.pg_version == '14.10'
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Java >= 11 is required.

This will build the project and run tests.

By default, [PostgreSQL 16.0 from Testcontainers](https://www.testcontainers.org/) is used to run tests.
By default, [PostgreSQL 16.1 from Testcontainers](https://www.testcontainers.org/) is used to run tests.
Set `TEST_PG_VERSION` environment variable to use any of other available PostgreSQL version:
```
TEST_PG_VERSION=11.20-alpine
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,14 @@ but the best way to do it is to use [DatabaseManagement::resetStatistics()](http
## Installation
Using Gradle:
```groovy
implementation 'io.github.mfvanek:pg-index-health:0.10.2'
implementation 'io.github.mfvanek:pg-index-health:0.10.3'
```

<details>
<summary>with Kotlin DSL</summary>

```kotlin
implementation("io.github.mfvanek:pg-index-health:0.10.2")
implementation("io.github.mfvanek:pg-index-health:0.10.3")
```
</details>

Expand All @@ -77,7 +77,7 @@ Using Maven:
<dependency>
<groupId>io.github.mfvanek</groupId>
<artifactId>pg-index-health</artifactId>
<version>0.10.2</version>
<version>0.10.3</version>
</dependency>
```

Expand Down
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ plugins {
id("java")
id("jacoco-report-aggregation")
id("org.sonarqube")
id("com.github.ben-manes.versions") version "0.50.0"
id("com.github.ben-manes.versions") version "0.51.0"
}

description = "pg-index-health build"

allprojects {
group = "io.github.mfvanek"
version = "0.10.3"
version = "0.10.4"

repositories {
mavenLocal()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,16 @@ dependencies {
implementation(it)
}

testImplementation("org.assertj:assertj-core:3.25.0")
testImplementation(platform("org.mockito:mockito-bom:5.8.0"))
testImplementation(platform("org.assertj:assertj-bom:3.25.2"))
testImplementation("org.assertj:assertj-core")
testImplementation(platform("org.mockito:mockito-bom:5.10.0"))
testImplementation(platform("org.junit:junit-bom:5.10.1"))
testImplementation("org.junit.jupiter:junit-jupiter-api")

testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine")

checkstyle("com.thomasjensen.checkstyle.addons:checkstyle-addons:7.0.1")
errorprone("com.google.errorprone:error_prone_core:2.24.0")
errorprone("com.google.errorprone:error_prone_core:2.24.1")
}

java {
Expand Down
2 changes: 1 addition & 1 deletion pg-index-health-testing/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ dependencies {
api(project(":pg-index-health-model"))
api(project(":pg-index-health-jdbc-connection"))
implementation(libs.apache.commons.dbcp2)
implementation(platform("org.testcontainers:testcontainers-bom:1.19.3"))
implementation(platform("org.testcontainers:testcontainers-bom:1.19.4"))
implementation("org.testcontainers:testcontainers")
implementation("org.testcontainers:postgresql")
implementation(libs.awaitility)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public boolean isOutParametersInProcedureSupported() {
/**
* Creates {@code PostgreSqlContainerWrapper} with default PostgreSQL version.
* The default version is taken from the environment variable {@code TEST_PG_VERSION} if it is set,
* otherwise the default version {@code 16.0} is used.
* otherwise the default version {@code 16.1} is used.
*
* @return {@code PostgreSqlContainerWrapper}
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ private static String preparePostgresVersion() {
if (pgVersion != null) {
return pgVersion;
}
return "16.0";
return "16.1";
}

@Nonnull
Expand Down Expand Up @@ -114,7 +114,7 @@ static PostgresVersionHolder forCluster(@Nonnull final String pgVersion) {
/**
* Creates {@code PostgresVersionHolder} for single node installation.
* The version is taken from the environment variable {@code TEST_PG_VERSION} if it is set,
* otherwise the default version {@code 16.0} is used.
* otherwise the default version {@code 16.1} is used.
*
* @return {@code PostgresVersionHolder}
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ void withDefaultVersionShouldWork() {

@Test
void withVersionShouldWork() {
try (PostgreSqlContainerWrapper container = PostgreSqlContainerWrapper.withVersion("16.0")) {
try (PostgreSqlContainerWrapper container = PostgreSqlContainerWrapper.withVersion("16.1")) {
assertThat(container)
.isNotNull()
.satisfies(c -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ void forClusterShouldBeBitnamiAware() {
.isEqualTo(System.getenv("TEST_PG_VERSION").split("-")[0] + ".0");
} else {
assertThat(versionHolder.getVersion())
.isEqualTo("16.0.0");
.isEqualTo("16.1.0");
}
}

Expand Down Expand Up @@ -110,7 +110,7 @@ void forSingleNodeShouldBeEnvAware() {
.isEqualTo(System.getenv("TEST_PG_VERSION"));
} else {
assertThat(versionHolder.getVersion())
.isEqualTo("16.0");
.isEqualTo("16.1");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ final class PostgresVersionTest extends DatabaseAwareTestBase {
@Test
void checkPgVersion() {
final String pgVersionFromEnv = System.getenv(PG_VERSION_ENVIRONMENT_VARIABLE);
final String requiredPgVersionString = (pgVersionFromEnv == null) ? "16.0 (Debian 16.0-" : pgVersionFromEnv.split("-")[0];
final String requiredPgVersionString = (pgVersionFromEnv == null) ? "16.1 (Debian 16.1-" : pgVersionFromEnv.split("-")[0];
final String actualPgVersionString = PostgresVersionReader.readVersion(getDataSource());
assertThat(actualPgVersionString)
.startsWith(requiredPgVersionString);
Expand Down

0 comments on commit 0355469

Please sign in to comment.