Skip to content

Commit

Permalink
chore: add test coverage for Java 21 (#227)
Browse files Browse the repository at this point in the history
* chore: add test coverage for Java 21

* allowlist api.adoptium.net:443

---------

Co-authored-by: Kenneth Rosario <kennethrosario@google.com>
  • Loading branch information
garethgeorge and kenneth-rosario authored Nov 7, 2023
1 parent 0f35dea commit 4c454f4
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/buildpack-integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ jobs:
prerun: 'invoker/conformance/prerun.sh'
builder-runtime: 'java17'
builder-runtime-version: '17'
builder-url: gcr.io/gae-runtimes/buildpacks/google-gae-22/java/builder:latest
builder-url: gcr.io/gae-runtimes/buildpacks/google-gae-22/java/builder:latest
4 changes: 1 addition & 3 deletions .github/workflows/conformance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ jobs:
strategy:
matrix:
java: [
11.x
# 12.x,
# 13.x
11.x,
]
steps:
- name: Harden Runner
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/unit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ jobs:
matrix:
java: [
11.x,
17.x
17.x,
21-ea
]
steps:
- name: Harden Runner
Expand All @@ -25,6 +26,8 @@ jobs:
allowed-endpoints: >
github.com:443
repo.maven.apache.org:443
api.adoptium.net:443
*.githubusercontent.com:443
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # v3.13.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,10 @@ private static int getJavaVersion() {
if (dot != -1) {
version = version.substring(0, dot);
}
int dash = version.indexOf("-");
if (dash != -1) {
version = version.substring(0, dash);
}
}
return Integer.parseInt(version);
}
Expand Down

0 comments on commit 4c454f4

Please sign in to comment.