Skip to content

Commit

Permalink
Update GitHub action to use Corretto 21 for Java
Browse files Browse the repository at this point in the history
  • Loading branch information
brtrvn committed Mar 14, 2024
1 parent 56858bc commit ce5a35a
Showing 1 changed file with 7 additions and 26 deletions.
33 changes: 7 additions & 26 deletions .github/workflows/pr-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,44 +6,26 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout PR
uses: actions/checkout@v2

- name: Cache Maven packages
uses: actions/cache@v2
uses: actions/checkout@v3
- name: Setup Java
uses: actions/setup-java@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2

# We use Corretto Java 11 for Lambda: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html
# Currently amazon-corretto Java is not supported for GitHub actions on Ubuntu-latest. By default we're using Adopt JDK11
# https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-README.md
# We may want to either switch to using an AL2 container (to give us corretto) or contribute a new JDK to the GitHub runners
# There is an open issue (as of 2021/06/30) requesting Corretto support: https://github.com/actions/setup-java/issues/68
# - name: Set up JDK 11
# uses: actions/setup-java@v2
# with:
# java-version: '11'
# distribution: 'adopt'

distribution: corretto
java-version: '21'
cache: maven
- name: Maven Compile, Test, Install
run: mvn install -Dcheckstyle.skip -Dspotbugs.skip

- name: Spotbugs Check
run: mvn spotbugs:check

- name: Code Style Check
run: mvn checkstyle:check

Build-WebClient:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- uses: actions/checkout@v3
- uses: actions/setup-node@v2
with:
node-version: 16

- name: Cache node modules
uses: actions/cache@v2
env:
Expand All @@ -56,7 +38,6 @@ jobs:
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
# CI=false is required because GitHub hosted runners set CI=true, which causes Warnings to be treated as Errors when doing yarn build
# this is a workaround to allow the build to succeed until we can get around to fixing the warnings generated
# https://docs.github.com/en/actions/reference/environment-variables#default-environment-variables
Expand Down

0 comments on commit ce5a35a

Please sign in to comment.