Skip to content

JBIDE-28870: update GH action workflow #243

JBIDE-28870: update GH action workflow

JBIDE-28870: update GH action workflow #243

Workflow file for this run

name: Build and Test
on:
pull_request:
branches: [main]
jobs:
test:
runs-on: ${{ matrix.os }} # compiles and test on Ubuntu
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
java: [ 17, 18 ]
fail-fast: false
steps:
- name: Checkout PR branch
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
# Checkout global JBT settings.xml
- name: Checkout JBoss Tools Build CI
uses: actions/checkout@v3
with:
repository: jbosstools/jbosstools-build-ci
path: build-ci
# Java JDK used for maven build
- name: Setup Java ${{ matrix.java }}
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'
cache: 'maven'
# Build and compile using Maven
- name: Build/Compile and run unit tests (Linux)
run: xvfb-run -a mvn clean verify -U -fae -B --settings build-ci/maven-settings.xml -DskipITests=true -Dmaven.test.error.ignore=true -Dmaven.test.failure.ignore=true -ntp
if: ${{ matrix.os == 'ubuntu-latest' }}
- name: Build/Compile and run unit tests (Mac)
run: mvn clean verify -U -fae -B --settings build-ci/maven-settings.xml -DskipITests=true -Dmaven.test.error.ignore=true -Dmaven.test.failure.ignore=true -ntp
if: ${{ matrix.os == 'macos-latest' }}
# as below, do fail builds on errors
- name: Build/Compile and run unit tests (Windows)
run: mvn clean verify --% -U -fae -B --settings build-ci/maven-settings.xml -fae -DskipITests=true -ntp
if: ${{ matrix.os == 'windows-latest' }}
# Archive artifacts to be applied in Publish Reports workflow
- name: Archiving test artifacts
uses: actions/upload-artifact@v3
if: ${{ matrix.os != 'windows-latest'}} # currently disabled because of https://github.com/actions/upload-artifact/issues/240
with:
name: ${{ matrix.os }}-${{ matrix.java }}-test-reports
path: |
*tests/*/target/surefire-reports/
*/*tests/*/target/surefire-reports/
**/*.log