Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade Spring Boot & Gradle Wrapper versions across the board #615

Merged
merged 11 commits into from
Oct 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
name: native-image
name: java-public-static-main-native-image-maven
"on":
merge_group:
pull_request:
paths:
- java/native-image/java-native-image-sample/**
- java/native-image/public-static-main-native-image-maven/**
push:
branches:
- main
paths:
- java/native-image/java-native-image-sample/**
- java/native-image/public-static-main-native-image-maven/**

jobs:
test:
Expand All @@ -23,10 +23,5 @@ jobs:
with:
java-version: ${{ matrix.java }}
distribution: 'zulu'
- uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('java/native-image/java-native-image-sample/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- run: ./mvnw -B package -Djava.version=${{ matrix.java }}
working-directory: java/native-image/java-native-image-sample
working-directory: java/native-image/public-static-main-native-image-maven
27 changes: 27 additions & 0 deletions .github/workflows/java-quarkus-native-image-maven.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: java-quarkus-native-image-maven
"on":
merge_group:
pull_request:
paths:
- java/native-image/quarkus-native-image-maven/**
push:
branches:
- main
paths:
- java/native-image/quarkus-native-image-maven/**

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
java: [17]

steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java }}
distribution: 'zulu'
- run: ./mvnw -B package -Djava.version=${{ matrix.java }}
working-directory: java/native-image/quarkus-native-image-maven
27 changes: 27 additions & 0 deletions .github/workflows/java-spring-boot-native-image-gradle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: java-spring-boot-native-image-gradle
"on":
merge_group:
pull_request:
paths:
- java/native-image/spring-boot-native-image-gradle/**
push:
branches:
- main
paths:
- java/native-image/spring-boot-native-image-gradle/**

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
java: [17]

steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java }}
distribution: 'zulu'
- run: ./gradlew build
working-directory: java/native-image/spring-boot-native-image-gradle
27 changes: 27 additions & 0 deletions .github/workflows/java-spring-boot-native-image-maven.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: java-spring-boot-native-image-maven
"on":
merge_group:
pull_request:
paths:
- java/native-image/spring-boot-native-image-maven/**
push:
branches:
- main
paths:
- java/native-image/spring-boot-native-image-maven/**

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
java: [17]

steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java }}
distribution: 'zulu'
- run: ./mvnw -B package -Djava.version=${{ matrix.java }}
working-directory: java/native-image/spring-boot-native-image-maven
74 changes: 25 additions & 49 deletions .github/workflows/test-all-samples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,70 +12,46 @@ on:
- 'scripts/.util/tools.json'

jobs:
prepare:
name: Prepare
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.paths.outputs.matrix }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Discover changed paths
id: paths
run: |
set -eo pipefail
all_java_smoke_test_paths=$( find ./java -iname "smoke_test" | jq --raw-input | jq --slurp --compact-output )
all_other_smoke_test_paths='["ca-certificates","dotnet-core","git","go","nodejs","php","procfile","python","ruby","web-servers"]'
all_paths=$( echo -e "$all_java_smoke_test_paths\n$all_other_smoke_test_paths" | jq -s 'add' -c )

echo "These are the Java projects we'll run smoke tests against: $all_java_smoke_test_paths" >> $GITHUB_STEP_SUMMARY
echo "These are the other folders we'll run smoke tests against: : $all_other_smoke_test_paths" >> $GITHUB_STEP_SUMMARY
echo "These are all the smoke test locations: $all_paths" >> $GITHUB_STEP_SUMMARY
echo "matrix={\"suite\":$all_paths}" >> $GITHUB_OUTPUT
echo "This is how the matrix will look like: $(cat $GITHUB_OUTPUT)"

smoke:
needs: prepare
name: Smoke Tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
max-parallel: 3
matrix:
suite:
- 'ca-certificates'
- 'dotnet-core'
- 'git'
- 'go'
- 'java'
- 'nodejs'
- 'php'
- 'procfile'
- 'python'
- 'ruby'
- 'web-servers'
matrix: ${{ fromJSON(needs.prepare.outputs.matrix) }}

steps:
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: 1.18.x
go-version: 1.20.x

- name: Checkout
uses: actions/checkout@v4

- name: Cache local Gradle repository
if: ${{ matrix.suite == 'java' }}
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('java/**/*.gradle*', 'java/**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-

- name: Cache local Maven repository
if: ${{ matrix.suite == 'java' }}
uses: actions/cache@v3
with:
path: |
~/.m2/repository
~/.m2/wrapper
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml', 'java/**/maven-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-maven-

- name: Setup Directories
if: ${{ matrix.suite == 'java' }}
run: |
#!/usr/bin/env bash
set -euo pipefail

mkdir -p ~/.m2/repository
mkdir -p ~/.m2/repository/wrapper/dists
mkdir -p ~/.gradle/caches
mkdir -p ~/.gradle/wrapper/dists
chmod -R 775 ~/.m2
chmod -R 775 ~/.gradle

- name: Test ${{ matrix.suite }}
run: |
./scripts/smoke.sh --builder paketobuildpacks/builder-jammy-full:latest --suite ${{ matrix.suite }}
Expand Down
61 changes: 0 additions & 61 deletions .github/workflows/test-pull-request-java-native-image.yml
Original file line number Diff line number Diff line change
@@ -1,61 +0,0 @@
name: Test Pull Request (Java Native Image)

on:
merge_group:
pull_request:
branches:
- main
paths:
- 'java/native-image/**'

jobs:
smoke:
name: Smoke Tests
runs-on: ubuntu-latest
steps:
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: 1.18.x

- name: Checkout
uses: actions/checkout@v4

- name: Cache local Gradle repository
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('java/**/*.gradle*', 'java/**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-

- name: Cache local Maven repository
uses: actions/cache@v3
with:
path: |
~/.m2/repository
~/.m2/wrapper
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml', 'java/**/maven-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-maven-

- name: Setup Directories
run: |
#!/usr/bin/env bash
set -euo pipefail

mkdir -p ~/.m2/repository
mkdir -p ~/.m2/repository/wrapper/dists
mkdir -p ~/.gradle/caches
mkdir -p ~/.gradle/wrapper/dists
chmod -R 775 ~/.m2
chmod -R 775 ~/.gradle

- name: Test Java Native Image Samples
run: |
./scripts/smoke.sh --suite java/native-image \
--builder paketobuildpacks/builder-jammy-full:latest \
--builder paketobuildpacks/builder-jammy-base:latest \
--builder paketobuildpacks/builder-jammy-tiny:latest
60 changes: 0 additions & 60 deletions .github/workflows/test-pull-request-java-node.yml
Original file line number Diff line number Diff line change
@@ -1,60 +0,0 @@
name: Test Pull Request (Java-Node)

on:
merge_group:
pull_request:
branches:
- main
paths:
- 'java/java-node/**'

jobs:
smoke:
name: Smoke Tests Java-Node
runs-on: ubuntu-latest
steps:
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: 1.18.x

- name: Checkout
uses: actions/checkout@v4

- name: Cache local Gradle repository
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('java/**/*.gradle*', 'java/**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-

- name: Cache local Maven repository
uses: actions/cache@v3
with:
path: |
~/.m2/repository
~/.m2/wrapper
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml', 'java/**/maven-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-maven-

- name: Setup Directories
run: |
#!/usr/bin/env bash
set -euo pipefail

mkdir -p ~/.m2/repository
mkdir -p ~/.m2/repository/wrapper/dists
mkdir -p ~/.gradle/caches
mkdir -p ~/.gradle/wrapper/dists
chmod -R 775 ~/.m2
chmod -R 775 ~/.gradle

- name: Test Java-Node Samples
run: |
./scripts/smoke.sh --suite java/java-node \
--builder paketobuildpacks/builder-jammy-full:latest \
--builder paketobuildpacks/builder-jammy-base:latest \
Loading
Loading