Skip to content

Commit 4022e4a

Browse files
committed
Add CI build on several Spring Framework generations
This commit adds a GHA workflow that builds the project against a list of configurable Spring Framework versions. The build action has been updated to accept an additional input that tunes the Spring Framework version the build is using As a result, the default Spring Framework version of the project is now configured in gradle.properties. Closes gh-1810
1 parent bedb949 commit 4022e4a

File tree

4 files changed

+51
-2
lines changed

4 files changed

+51
-2
lines changed

.github/actions/build/action.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ inputs:
2424
description: 'Whether to publish artifacts ready for deployment to Artifactory'
2525
required: false
2626
default: 'false'
27+
spring-framework-version:
28+
description: 'Spring Framework version to use'
29+
required: false
2730
outputs:
2831
build-scan-url:
2932
description: 'URL, if any, of the build scan produced by the build'
@@ -46,7 +49,7 @@ runs:
4649
id: build
4750
if: ${{ inputs.publish == 'false' }}
4851
shell: bash
49-
run: ./gradlew check
52+
run: ./gradlew check ${{ inputs.spring-framework-version != '' && format('-PspringFrameworkVersion={0}', inputs.spring-framework-version) || '' }}
5053
- name: Publish
5154
id: publish
5255
if: ${{ inputs.publish == 'true' }}

.github/workflows/ci.yml

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: CI
2+
on:
3+
push:
4+
branches:
5+
- main
6+
concurrency:
7+
group: ${{ github.workflow }}-${{ github.ref }}
8+
jobs:
9+
ci:
10+
name: 'Java ${{ matrix.java.version}} | Spring Framework ${{ matrix.spring.generation}}'
11+
if: ${{ github.repository == 'spring-projects/spring-webflow' }}
12+
runs-on: ubuntu-latest
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
java:
17+
- version: 17
18+
toolchain: false
19+
spring:
20+
- generation: 6.1.x
21+
version: 6.0.13
22+
- generation: 6.2.x
23+
version: 6.2.0-SNAPSHOT
24+
steps:
25+
- name: Check Out Code
26+
uses: actions/checkout@v4
27+
- name: Build
28+
id: build
29+
uses: ./.github/actions/build
30+
with:
31+
develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
32+
java-early-access: ${{ matrix.java.early-access || 'false' }}
33+
java-distribution: ${{ matrix.java.distribution }}
34+
java-toolchain: ${{ matrix.java.toolchain }}
35+
java-version: ${{ matrix.java.version }}
36+
spring-framework-version: ${{ matrix.spring.version }}
37+
- name: Send Notification
38+
if: always()
39+
uses: ./.github/actions/send-notification
40+
with:
41+
build-scan-url: ${{ steps.build.outputs.build-scan-url }}
42+
run-name: ${{ format('{0} | Java {1} | Spring Framework {2}', github.ref_name, matrix.java.version,matrix.spring.version) }}
43+
status: ${{ job.status }}
44+
webhook-url: ${{ secrets.GOOGLE_CHAT_WEBHOOK_URL }}

build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ allprojects {
2121

2222
dependencyManagement {
2323
imports {
24-
mavenBom "org.springframework:spring-framework-bom:6.0.7"
24+
mavenBom "org.springframework:spring-framework-bom:${springFrameworkVersion}"
2525
mavenBom "org.springframework.security:spring-security-bom:6.0.2"
2626
mavenBom "org.junit:junit-bom:5.7.2"
2727
}

gradle.properties

+2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
version=3.0.1-SNAPSHOT
22
org.gradle.caching=true
3+
4+
springFrameworkVersion=6.0.7

0 commit comments

Comments
 (0)