Skip to content

Commit 3d2fb3a

Browse files
committed
Add verification tests
In preparation for releasing Spring Framework from GitHub actions, this commit adds a `verify` workflow that validates that the released bits are correct by running sample projects against them. Closes gh-33178
1 parent 4f38079 commit 3d2fb3a

File tree

2 files changed

+82
-0
lines changed

2 files changed

+82
-0
lines changed

.github/workflows/build-and-deploy-snapshot.yml

+11
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,14 @@ jobs:
4646
run-name: ${{ format('{0} | Linux | Java 17', github.ref_name) }}
4747
outputs:
4848
version: ${{ steps.build-and-publish.outputs.version }}
49+
verify:
50+
name: Verify
51+
needs: build-and-deploy-snapshot
52+
uses: ./.github/workflows/verify.yml
53+
secrets:
54+
google-chat-webhook-url: ${{ secrets.GOOGLE_CHAT_WEBHOOK_URL }}
55+
repository-password: ${{ secrets.ARTIFACTORY_PASSWORD }}
56+
repository-username: ${{ secrets.ARTIFACTORY_USERNAME }}
57+
token: ${{ secrets.GH_ACTIONS_REPO_TOKEN }}
58+
with:
59+
version: ${{ needs.build-and-deploy-snapshot.outputs.version }}

.github/workflows/verify.yml

+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: Verify
2+
on:
3+
workflow_call:
4+
inputs:
5+
version:
6+
required: true
7+
type: string
8+
staging:
9+
required: false
10+
default: false
11+
type: boolean
12+
secrets:
13+
repository-username:
14+
required: false
15+
repository-password:
16+
required: false
17+
google-chat-webhook-url:
18+
required: true
19+
token:
20+
required: true
21+
jobs:
22+
verify:
23+
name: Verify
24+
runs-on: ubuntu-latest
25+
steps:
26+
- name: Check Out Release Verification Tests
27+
uses: actions/checkout@v4
28+
with:
29+
repository: spring-projects/spring-framework-release-verification
30+
ref: 'v0.0.2'
31+
token: ${{ secrets.token }}
32+
- name: Check Out Send Notification Action
33+
uses: actions/checkout@v4
34+
with:
35+
path: spring-framework
36+
sparse-checkout: .github/actions/send-notification
37+
- name: Set Up Java
38+
uses: actions/setup-java@v4
39+
with:
40+
distribution: 'liberica'
41+
java-version: 17
42+
- name: Set Up Gradle
43+
uses: gradle/actions/setup-gradle@dbbdc275be76ac10734476cc723d82dfe7ec6eda # v3.4.2
44+
with:
45+
cache-read-only: false
46+
- name: Configure Gradle Properties
47+
shell: bash
48+
run: |
49+
mkdir -p $HOME/.gradle
50+
echo 'org.gradle.daemon=false' >> $HOME/.gradle/gradle.properties
51+
- name: Run Release Verification Tests
52+
env:
53+
RVT_VERSION: ${{ inputs.version }}
54+
RVT_RELEASE_TYPE: oss
55+
RVT_STAGING: ${{ inputs.staging }}
56+
RVT_OSS_REPOSITORY_USERNAME: ${{ secrets.repository-username }}
57+
RVT_OSS_REPOSITORY_PASSWORD: ${{ secrets.repository-password }}
58+
run: ./gradlew spring-framework-release-verification-tests:test
59+
- name: Upload Build Reports on Failure
60+
uses: actions/upload-artifact@v4
61+
if: failure()
62+
with:
63+
name: build-reports
64+
path: '**/build/reports/'
65+
- name: Send Notification
66+
uses: ./spring-framework/.github/actions/send-notification
67+
if: failure()
68+
with:
69+
webhook-url: ${{ secrets.google-chat-webhook-url }}
70+
status: ${{ job.status }}
71+
run-name: ${{ format('{0} | Verification | {1}', github.ref_name, inputs.version) }}

0 commit comments

Comments
 (0)