Testing only. #561
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
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.11.0 | |
if: github.ref == 'refs/heads/main' | |
- uses: getong/elasticsearch-action@v1.2 | |
with: | |
elasticsearch version: '7.9.0' | |
if: runner.os == 'Linux' | |
- uses: actions/checkout@v3 | |
- name: Set up JDK | |
uses: actions/setup-java@v3 | |
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@v3 | |
continue-on-error: true | |
if: matrix.target == 'deploy' | |
- name: Publish Unit Test Results | |
uses: EnricoMi/publish-unit-test-result-action@v2.10.0 | |
if: always() && runner.os == 'Linux' | |
with: | |
check_name: Tests results java ${{ matrix.java }}, os ${{ matrix.os }} | |
junit_files: "**/target/surefire-reports/*.xml" |