Skip to content

Merge remote-tracking branch 'origin/main' #762

Merge remote-tracking branch 'origin/main'

Merge remote-tracking branch 'origin/main' #762

Workflow file for this run

---
name: build
on:
push:
branches: [main, "REL-*"]
workflow_dispatch:
inputs:
skipTests:
description: 'Skip tests'
required: true
default: 'false'
env:
skipTests: false
jobs:
build:
strategy:
matrix:
# Unable to parse command line options: Unrecognized option: -inputFormat -> I don't get it, lets skip windows builds for now
# os: [ ubuntu-latest, windows-latest]
include:
- os: ubuntu-latest
java: 21
target: 'test'
- os: windows-latest
java: 17
target: 'test'
- os: ubuntu-latest
java: 17
target: 'deploy'
runs-on: ${{ matrix.os }}
steps:
- name: Cancel previous Action
uses: styfle/cancel-workflow-action@0.12.1
if: github.ref == 'refs/heads/main'
- uses: getong/elasticsearch-action@v1.3
with:
elasticsearch version: '7.9.0'
if: runner.os == 'Linux'
- uses: actions/checkout@v4.1.2
- name: Set up JDK
uses: actions/setup-java@v4.2.1
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
server-id: vpro-ossrh
server-username: SONATYPE_USERNAME
server-password: SONATYPE_PASSWORD
gpg-private-key: ${{ secrets.GPG_SECRET_KEY }}
gpg-passphrase: GPG_SECRET_KEY_PASSPHRASE
cache: maven
- name: Build and ${{ matrix.target }} with Maven
run: "mvn -ntp -fae -DskipITs=false -DskipTests=${skipTests} -Dinteg.cluster.name=docker-elasticsearch -B -P'deploy,sonatype' ${{ matrix.target }} -Dgpg.skip=false"
env:
SONATYPE_USERNAME: vpro
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
GPG_SECRET_KEY_PASSPHRASE: ${{ secrets.GPG_SECRET_KEY_PASSPHRASE }}
continue-on-error: ${{ matrix.target != 'deploy' }}
- name: Publish to codecov
uses: codecov/codecov-action@v4.1.0
continue-on-error: true
if: matrix.target == 'deploy'
- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v2.16.1
if: always() && runner.os == 'Linux'
with:
check_name: Tests results java ${{ matrix.java }}, os ${{ matrix.os }}
junit_files: "**/target/surefire-reports/*.xml"