Skip to content

[release merge] Merge from stable version 3.2.3 to master #180

[release merge] Merge from stable version 3.2.3 to master

[release merge] Merge from stable version 3.2.3 to master #180

Workflow file for this run

# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: PR Build
on: [pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up cache for ~./m2/repository
uses: actions/[email protected]
with:
path: ~/.m2/repository
key: maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
maven-
- name: Install Toolchain JDK 1.8
if: ${{ !contains(github.base_ref, 'maint') }}
uses: battila7/jdk-via-jabba@v1
with:
jdk: '[email protected]'
addBinDirectoryToPath: false
javaHomeEnvironmentVariable: J8_TOOLCHAIN_JDK
- name: Install Toolchain JDK 11
if: ${{ !contains(github.base_ref, 'maint') }}
uses: battila7/jdk-via-jabba@v1
with:
jdk: '[email protected]'
addBinDirectoryToPath: false
javaHomeEnvironmentVariable: J11_TOOLCHAIN_JDK
- name: Set up Toolchain
if: ${{ !contains(github.base_ref, 'maint') }}
shell: bash
run: |
mkdir -p $HOME/.m2 \
&& cat << EOF > $HOME/.m2/toolchains.xml
<?xml version="1.0" encoding="UTF8"?>
<toolchains>
<toolchain>
<type>jdk</type>
<provides>
<version>1.8</version>
<vendor>OpenJDK</vendor>
</provides>
<configuration>
<jdkHome>${{ env.J8_TOOLCHAIN_JDK }}</jdkHome>
</configuration>
</toolchain>
<toolchain>
<type>jdk</type>
<provides>
<version>11</version>
<vendor>OpenJDK</vendor>
</provides>
<configuration>
<jdkHome>${{ env.J11_TOOLCHAIN_JDK }}</jdkHome>
</configuration>
</toolchain>
</toolchains>
EOF
- name: Set up JDK
if: ${{ contains(github.base_ref, 'maint') }}
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'adopt'
- name: Set up JDK
if: ${{ !contains(github.base_ref, 'maint') }}
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
- name: maven-settings-xml-action
uses: whelk-io/maven-settings-xml-action@v14
with:
repositories: '[{ "id": "sonatype", "url": "https://oss.sonatype.org/content/repositories/snapshots/", "releases": {"enabled": "false"}, "snapshots": {"enabled": "true" }}]'
- name: Build with Maven
run: mvn -Prun-its,no-cluster-tests -B -e verify