From 87bcafdd9a7594e701ef466d626388c8fe6aee3a Mon Sep 17 00:00:00 2001 From: Ken Wills Date: Tue, 11 Aug 2020 15:12:33 -0500 Subject: [PATCH] Add GitHub Actions CI --- .github/workflows/ci.yml | 44 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000..bacd9d5cd --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,44 @@ +# This workflow will build a Java project with Maven +# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven + +name: Wildfly EJB Client CI + +on: + pull_request: + types: [opened, synchronize, reopened, ready_for_review] + +jobs: + build-test-matrix: + name: ${{ matrix.impl}}-${{ matrix.jdk }}-${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-20.04, windows-latest] + jdk: [8, 11] + impl: [hotspot, openj9] + steps: + - name: Configure runner - Linux + if: contains(matrix.os, 'ubuntu') + run: | + sudo bash -c "echo '127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4' > /etc/hosts" + sudo bash -c "echo '::1 localhost localhost.localdomain localhost6 localhost6.localdomain6' >> /etc/hosts" + - name: Configure Runner - Windows + if: contains(matrix.os, 'windows') + run: | + echo '127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4' > %SystemRoot%\System32\drivers\etc\hosts + echo '::1 localhost localhost.localdomain localhost6 localhost6.localdomain6' >> %SystemRoot%\System32\drivers\etc\hosts + shell: cmd + - uses: actions/checkout@v2 + - name: Set up JDK ${{ matrix.jdk }} + uses: AdoptOpenJDK/install-jdk@v1 + with: + version: ${{ matrix.jdk }} + impl: ${{ matrix.impl }} + - name: Run Tests + run: mvn -U -B -fae clean install test + - uses: actions/upload-artifact@v2 + if: failure() + with: + name: surefire-reports-${{ matrix.openjdk}}-${{ matrix.jdk }}-${{ matrix.os }} + path: '**/surefire-reports/*.txt'