Skip to content

Commit

Permalink
Bump org.springframework.boot from 3.3.1 to 3.3.3 (#35)
Browse files Browse the repository at this point in the history
* Bump org.springframework.boot from 3.3.1 to 3.3.3

Bumps [org.springframework.boot](https://github.com/spring-projects/spring-boot) from 3.3.1 to 3.3.3.
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](spring-projects/spring-boot@v3.3.1...v3.3.3)

---
updated-dependencies:
- dependency-name: org.springframework.boot
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* General update + another PR merge

* Re-enabling and configuring JaCoCo

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Roman Khlebnov <[email protected]>
  • Loading branch information
dependabot[bot] and SuppieRK authored Sep 18, 2024
1 parent 3418c45 commit 89d6ac5
Show file tree
Hide file tree
Showing 7 changed files with 103 additions and 66 deletions.
33 changes: 14 additions & 19 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# This workflow will build a Java project with Gradle
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle

name: Java CI with Gradle for master branch
name: Java CI with Gradle for general purposes

on:
workflow_dispatch: {}
push:
branches: [ master ]
branches:
- '**'
paths-ignore:
- '**.yml'
- '**.md'
Expand All @@ -30,28 +31,22 @@ jobs:
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v3

- name: Cache SonarCloud packages
uses: actions/cache@v4
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar

- name: Cache Gradle packages
uses: actions/cache@v4
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Run FOSSA license check
uses: fossas/fossa-action@main # Use a specific version if locking is preferred
with:
api-key: ${{ secrets.FOSSA_API_KEY }}

- name: Build with Gradle
run: ./gradlew spotlessJavaCheck build

- name: Publish to Maven Central
run: ./gradlew publishAllPublicationsToMavenCentral --no-configuration-cache
- name: Build with Gradle and analyze
run: ./gradlew build sonar --info
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.ORG_GRADLE_PROJECT_MAVENCENTRALUSERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.ORG_GRADLE_PROJECT_MAVENCENTRALPASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGINMEMORYKEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGINMEMORYKEYPASSWORD }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
38 changes: 0 additions & 38 deletions .github/workflows/pr.yml

This file was deleted.

48 changes: 48 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# This workflow will build a Java project with Gradle
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle

name: Java CI with Gradle for publication on tag creation

on:
workflow_dispatch: {}
push:
tags:
- '**'

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17

- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v3

- name: Cache Gradle packages
uses: actions/cache@v4
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle

- name: Run FOSSA license check
uses: fossas/fossa-action@main # Use a specific version if locking is preferred
with:
api-key: ${{ secrets.FOSSA_API_KEY }}

- name: Build with Gradle
run: ./gradlew build

- name: Publish to Maven Central
run: ./gradlew publishAllPublicationsToMavenCentral --no-configuration-cache
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.ORG_GRADLE_PROJECT_MAVENCENTRALUSERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.ORG_GRADLE_PROJECT_MAVENCENTRALPASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGINMEMORYKEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGINMEMORYKEYPASSWORD }}
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ This version does not allow setting most of the local cache properties in favor
<dependency>
<groupId>io.github.suppierk</groupId>
<artifactId>spring-boot-multilevel-cache-starter</artifactId>
<version>3.3.1.0</version>
<version>3.3.3.0</version>
</dependency>
```

### Gradle
```groovy
implementation 'io.github.suppierk:spring-boot-multilevel-cache-starter:3.3.1.0'
implementation 'io.github.suppierk:spring-boot-multilevel-cache-starter:3.3.3.0'
```

## Use cases
Expand Down
31 changes: 28 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@ plugins {
id 'java-library'

// Core frameworks
id 'org.springframework.boot' version '3.3.1'
id 'org.springframework.boot' version '3.3.3'
id 'io.spring.dependency-management' version '1.1.6'

// Publishing
id 'com.vanniktech.maven.publish' version '0.29.0'

// Utility
// id 'jacoco'
id 'jacoco'
id 'org.sonarqube' version '4.4.1.3373'
id 'com.diffplug.spotless' version '6.25.0'
}

Expand Down Expand Up @@ -44,7 +45,7 @@ configurations {

dependencyManagement {
imports {
mavenBom "org.springframework.cloud:spring-cloud-dependencies:2023.0.2"
mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.3'
}
}

Expand Down Expand Up @@ -130,3 +131,27 @@ tasks.withType(JavaCompile).configureEach {
options.encoding = StandardCharsets.UTF_8.name()
dependsOn(spotlessJavaCheck)
}

test {
// Report is always generated after tests run
finalizedBy jacocoTestReport
}

jacocoTestReport {
// Tests are required to run before generating the report
dependsOn test

reports {
html.required = true
xml.required = true
csv.required = false
}
}

sonar {
properties {
property "sonar.projectKey", "SuppieRK_spring-boot-multilevel-cache-starter"
property "sonar.organization", "suppierk"
property "sonar.host.url", "https://sonarcloud.io"
}
}
5 changes: 4 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ SONATYPE_AUTOMATIC_RELEASE=true

GROUP=io.github.suppierk
POM_ARTIFACT_ID=spring-boot-multilevel-cache-starter
VERSION_NAME=3.3.1.0
VERSION_NAME=3.3.3.0
POM_PACKAGING=jar

POM_NAME=Spring Boot Multilevel Cache Starter
Expand All @@ -49,3 +49,6 @@ POM_DEVELOPER_URL=https://github.com/SuppieRK/

SONATYPE_CONNECT_TIMEOUT_SECONDS=300
SONATYPE_CLOSE_TIMEOUT_SECONDS=1800

# Miscellaneous
systemProp.sonar.gradle.skipCompile=true
Original file line number Diff line number Diff line change
Expand Up @@ -107,15 +107,19 @@ void instantiationTestWithDifferentCacheTypes(CacheType cacheType) {
@MethodSource("localExpirationModes")
void instantiationTestWithDifferentLocalExpirationModes(
String mode, LocalExpirationMode expected) {
ApplicationContextRunner runner =
ApplicationContextRunner applicationContextRunner =
this.runner
.withPropertyValues("spring.data.redis.host=" + System.getProperty("HOST"))
.withPropertyValues("spring.data.redis.port=" + System.getProperty("PORT"))
.withPropertyValues("spring.cache.type=" + CacheType.REDIS.name().toLowerCase());

if (mode != null) {
runner = runner.withPropertyValues("spring.cache.multilevel.local.expiration-mode=" + mode);
applicationContextRunner =
applicationContextRunner.withPropertyValues(
"spring.cache.multilevel.local.expiration-mode=" + mode);
}
runner.run(

applicationContextRunner.run(
context -> {
MultiLevelCacheManager cacheManager = context.getBean(MultiLevelCacheManager.class);
Assertions.assertThat(cacheManager.getProperties().getLocal().getExpirationMode())
Expand Down

0 comments on commit 89d6ac5

Please sign in to comment.