-
Notifications
You must be signed in to change notification settings - Fork 66
114 lines (109 loc) · 3.46 KB
/
prs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
name: PR Validation
on:
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
outputs:
spring_content_version: ${{ steps.build.outputs.spring_content_version }}
steps:
- uses: actions/checkout@v2
with:
path: spring-content
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Build and Test
id: build
run: |
export AWS_REGION=us-west-1
pushd spring-content
mvn -B -P tests -Dmaven.javadoc.skip=true install --file pom.xml
project_version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
echo "spring_content_version=${project_version}" >> $GITHUB_OUTPUT
popd
- name: Save Maven Cache
id: cache-maven-save
uses: actions/cache/save@v3
with:
path: ~/.m2
key: ${{ runner.os }}-maven-${{ github.run_id }}
validate-with-examples:
runs-on: ubuntu-latest
needs: build
steps:
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Restore Maven packages
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-maven-${{ github.run_id }}
- uses: actions/checkout@v2
with:
path: spring-content
- name: Re-build spring-content
run: |
pushd spring-content
mvn install -DskipTests=true
popd
- uses: actions/checkout@v2
with:
repository: paulcwarren/spring-content-examples
path: spring-content-examples
ref: refs/heads/main
- name: Validate against Examples
run: |
export AWS_REGION=us-west-1
pushd spring-content-examples
git fetch --all
git checkout main
SPRING_CONTENT_VERSION=${{ needs.build.outputs.spring_content_version }} mvn -B clean install
popd
# - name: Setup tmate session if anything fails
# if: ${{ failure() }}
# uses: mxschmitt/action-tmate@v3
# timeout-minutes: 360
validate-with-gettingstarteds:
runs-on: ubuntu-latest
needs: build
steps:
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Restore Maven packages
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-maven-${{ github.run_id }}
- uses: actions/checkout@v2
with:
repository: paulcwarren/spring-content-gettingstarted
path: spring-content-gettingstarted
ref: refs/heads/feat/content-preservation
- name: Validate against Getting Started Guides
run: |
export AWS_REGION=us-west-1
pushd spring-content-gettingstarted
SPRING_CONTENT_VERSION=${{ needs.build.outputs.spring_content_version }} mvn -B clean install
popd