Skip to content

use action/checkout@v4 (#497) #941

use action/checkout@v4 (#497)

use action/checkout@v4 (#497) #941

Workflow file for this run

name: Build and Test Java Application
on:
push:
branches:
- "main"
paths-ignore:
- '.gitignore'
- 'CODEOWNERS'
- 'LICENSE'
- '*.md'
- '*.adoc'
- '*.txt'
- '.all-contributorsrc'
pull_request:
paths-ignore:
- '.gitignore'
- 'CODEOWNERS'
- 'LICENSE'
- '*.md'
- '*.adoc'
- '*.txt'
- '.all-contributorsrc'
jobs:
build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11
- name: Get Date
id: get-date
run: |
echo "date=$(/bin/date -u "+%Y-%m")" >> $GITHUB_OUTPUT
shell: bash
- name: Cache Maven Repository
id: cache-maven
uses: actions/cache@v3
with:
path: ~/.m2/repository
# resulting in faster build times.
key: maven-repo-${{ runner.os }}-${{ hashFiles('**/pom.xml') }}
- name: Install pnpm
run: npm install -g pnpm
- name: Maven Version
run: mvn --version
- name: Build with Maven
run: mvn -B formatter:validate install --file pom.xml
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11
- name: Get Date
id: get-date
run: |
echo "date=$(/bin/date -u "+%Y-%m")" >> $GITHUB_OUTPUT
shell: bash
- name: Cache Maven Repository
id: cache-maven
uses: actions/cache@v3
with:
path: ~/.m2/repository
# resulting in faster build times.
key: maven-repo-${{ runner.os }}-${{ hashFiles('**/pom.xml') }}
- name: Install pnpm
run: npm install -g pnpm@~8.6.12
- name: Maven Version
run: mvn --version
- name: Build with Maven
run: mvn -B install --file pom.xml