Skip to content

Build CDI Test

Build CDI Test #1592

Workflow file for this run

name: Build CDI Test
on:
push:
pull_request:
schedule:
- cron: '0 19 * * 6'
jobs:
build:
name: Maven Build JDK ${{ matrix.java }} Jakarta EE ${{ matrix.jakarta-ee }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
java: [ '11', '17', '21' ]
jakarta-ee: [ '9', '10' ]
include:
- java: 17
extratestargs: >
jacoco:report
sonar:sonar
-Dsonar.host.url=https://sonarcloud.io
-Dsonar.organization=guhilling-github
-Dsonar.projectKey=de.hilling.junit.cdi:cdi-test
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: ${{ matrix.java }}
cache: maven
- name: Maven Build JDK ${{ matrix.java }} Jakarta EE ${{ matrix.jakarta-ee }}
run: mvn -B package -Pjakarta-ee-${{ matrix.jakarta-ee }} --file pom.xml -DskipTests ${{ matrix.extraargs }}
- name: Maven Test with Sonar JDK ${{ matrix.java }} Jakarta EE ${{ matrix.jakarta-ee }}
if: ${{ env.SONAR_TOKEN != '' }}
run: mvn -B test -PPjakarta-ee-${{ matrix.jakarta-ee }} --file pom.xml ${{ matrix.extraargs }} ${{ matrix.extratestargs}}
- name: Maven Test JDK ${{ matrix.java }} Jakarta EE ${{ matrix.jakarta-ee }} (Pull Request)
if: ${{ env.SONAR_TOKEN == '' }}
run: mvn -B test -PPjakarta-ee-${{ matrix.jakarta-ee }} --file pom.xml ${{ matrix.extraargs }}