|
| 1 | +# This workflow will build a Java project with Maven |
| 2 | +# For more information see: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions |
| 3 | + |
| 4 | +name: Test Undertow EE with Undertow 2.4 SNAPSHOT |
| 5 | + |
| 6 | +on: |
| 7 | + push: |
| 8 | + branches: |
| 9 | + - 'main' |
| 10 | + schedule: |
| 11 | + - cron: '0 0 * * *' # Every day at 00:00 UTC |
| 12 | + |
| 13 | +# Only run the latest job |
| 14 | +concurrency: |
| 15 | + group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}' |
| 16 | + cancel-in-progress: true |
| 17 | + |
| 18 | +jobs: |
| 19 | + snapshot-build: |
| 20 | + runs-on: ubuntu-latest |
| 21 | + timeout-minutes: 90 |
| 22 | + outputs: |
| 23 | + undertow-version: ${{ steps.version.outputs.undertow-version }} |
| 24 | + |
| 25 | + steps: |
| 26 | + - name: Checkout Undertow |
| 27 | + uses: actions/checkout@v5 |
| 28 | + with: |
| 29 | + repository: undertow-io/undertow |
| 30 | + ref: '2.4.x' |
| 31 | + - name: Set up JDK |
| 32 | + uses: actions/setup-java@v5 |
| 33 | + with: |
| 34 | + java-version: 21 |
| 35 | + distribution: 'temurin' |
| 36 | + cache: 'maven' |
| 37 | + - name: Build Undertow SNAPSHOT |
| 38 | + run: mvn -V clean install -DskipTests -B '-Dmaven.compiler.proc=full' |
| 39 | + - id: version |
| 40 | + run: echo "undertow-version=$(mvn -B help:evaluate -Dexpression=project.version -DforceStdout -q)" >> $GITHUB_OUTPUT |
| 41 | + - name: Archive the repository |
| 42 | + run: | |
| 43 | + cd ~ |
| 44 | + find ./.m2/repository -type d -name "*SNAPSHOT" -print0 | xargs -0 tar -czf ~/undertow-maven-repository.tar.gz |
| 45 | + - uses: actions/upload-artifact@v4 |
| 46 | + with: |
| 47 | + name: undertow-maven-repository |
| 48 | + path: ~/undertow-maven-repository.tar.gz |
| 49 | + retention-days: 5 |
| 50 | + integration-build: |
| 51 | + |
| 52 | + runs-on: ${{ matrix.os }} |
| 53 | + needs: snapshot-build |
| 54 | + timeout-minutes: 90 |
| 55 | + strategy: |
| 56 | + fail-fast: false |
| 57 | + matrix: |
| 58 | + os: [ubuntu-latest, windows-latest ] |
| 59 | + java: ['17', '21', '25'] |
| 60 | + profiles: ['', '-Pproxy', '-Dtest.ipv6=true'] |
| 61 | + |
| 62 | + steps: |
| 63 | + - name: Checkout Undertow EE |
| 64 | + uses: actions/checkout@v5 |
| 65 | + - name: Set up JDK ${{ matrix.java }} |
| 66 | + uses: actions/setup-java@v5 |
| 67 | + with: |
| 68 | + java-version: ${{ matrix.java }} |
| 69 | + distribution: 'temurin' |
| 70 | + cache: 'maven' |
| 71 | + - uses: actions/download-artifact@v4 |
| 72 | + with: |
| 73 | + name: undertow-maven-repository |
| 74 | + path: . |
| 75 | + - name: Extract Maven Repo |
| 76 | + shell: bash |
| 77 | + run: | |
| 78 | + tar -xzf undertow-maven-repository.tar.gz -C ~ |
| 79 | + - name: Build with Maven Java ${{ matrix.java }} - ${{ matrix.os }} |
| 80 | + run: mvn -V clean install -U -B -fae ${{ matrix.profile }} '-Dversion.io.undertow=${{ needs.snapshot-build.outputs.undertow-version }}' |
| 81 | + - uses: actions/upload-artifact@v4 |
| 82 | + if: failure() |
| 83 | + with: |
| 84 | + name: surefire-reports-${{ matrix.os }}-${{ matrix.java }}-${{ matrix.profile }} |
| 85 | + path: '**/surefire-reports/*' |
0 commit comments