Skip to content

Commit

Permalink
Update java21.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
kalaiyarasiganeshalingam authored Nov 7, 2024
1 parent 1deefb3 commit f1b85ff
Showing 1 changed file with 28 additions and 18 deletions.
46 changes: 28 additions & 18 deletions .github/workflows/java21.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,41 @@
# separate terms of service, privacy policy, and support
# documentation.

name: Java 21 with Maven
name: Java 21 Maven Build

on:
push:
branches: [ "java21" ]
branches:
- '*' # Runs on push to any branch
pull_request:
branches: [ "java21" ]
branches:
- '*' # Runs on any pull request
workflow_dispatch:

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
cache: maven
- name: Build with Maven
run: mvn clean install

# Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive
- name: Update dependency graph
uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6

- name: Check out the code
uses: actions/checkout@v3

- name: Set up Java 21
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '21'

- name: Cache Maven dependencies
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Build with Maven
run: mvn clean install

- name: Run Tests
run: mvn test

0 comments on commit f1b85ff

Please sign in to comment.