Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.3.x] JBERET-547 Add github action CI workflow #201

Merged
merged 1 commit into from
Mar 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions .github/workflows/jberet-1.x.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# 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: JBeret 1.x

on:
pull_request:
branches:
- 1.*
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: [ macos-latest, windows-latest ]
jdk: [ 8 ]
impl: [ hotspot ]
steps:
- name: Configure runner - Linux
if: contains(matrix.os, 'macos')
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 -ntp -U -B -fae clean install
- uses: actions/upload-artifact@v2
if: failure()
with:
name: surefire-reports-${{ matrix.openjdk}}-${{ matrix.jdk }}-${{ matrix.os }}
path: '**/surefire-reports/*.txt'
47 changes: 47 additions & 0 deletions .github/workflows/jberet-2.x.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# 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: JBeret

on:
pull_request:
branches:
- master
- 2.*
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: [ macos-latest, windows-latest ]
jdk: [ 11 ]
impl: [ hotspot ]
steps:
- name: Configure runner - Linux
if: contains(matrix.os, 'macos')
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 -ntp -U -B -fae clean install
- uses: actions/upload-artifact@v2
if: failure()
with:
name: surefire-reports-${{ matrix.openjdk}}-${{ matrix.jdk }}-${{ matrix.os }}
path: '**/surefire-reports/*.txt'