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

Add WF build and tests to CI #271

Merged
merged 1 commit into from
Nov 22, 2023
Merged
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
82 changes: 65 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,32 +11,80 @@ on:
types: [opened, synchronize, reopened, ready_for_review]


jobs:
build:
name: ${{ matrix.os }}-jdk${{ matrix.java }}
jobs:
galleon-plugins-build:
name: galleon-plugins-${{ matrix.os }}-jdk${{ matrix.java }}
runs-on: ${{ matrix.os }}
outputs:
galleon-plugins-version: ${{ steps.version.outputs.galleon-plugins-version }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest ]
os: [ubuntu-latest]
java: ['11', '17']

steps:
- uses: actions/checkout@v2
- uses: actions/cache@v1
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- uses: actions/checkout@v4
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v1
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java }}
- name: Build and Test on ${{ matrix.java }}
run: mvn clean install
- uses: actions/upload-artifact@v2
distribution: 'temurin'
cache: 'maven'
- name: Build and Test Galleon plugins on ${{ matrix.java }}
run: mvn -U -B -ntp clean install
shell: bash
- id: version
run: echo "galleon-plugins-version=$(mvn -B help:evaluate -Dexpression=project.version -DforceStdout -q)" >> $GITHUB_OUTPUT
- name: Archive the repository
if: matrix.java == '11'
run: |
cd ~
find ./.m2/repository -type d -name "*SNAPSHOT" -print0 | xargs -0 tar -czf ~/galleon-plugins-maven-repository.tar.gz
- uses: actions/upload-artifact@v3
if: matrix.java == '11'
with:
name: galleon-plugins-maven-repository
path: ~/galleon-plugins-maven-repository.tar.gz
retention-days: 5
- name: Upload Test Reports on Failure
uses: actions/upload-artifact@v3
if: failure()
with:
name: surefire-reports-${{ matrix.os }}-${{ matrix.java }}
path: '**/surefire-reports/*.txt'
path: '**/surefire-reports/*.txt'

wildfly-build-and-test:
name: Linux/Windows - JDK11 and JDK17
uses: wildfly/wildfly/.github/workflows/shared-wildfly-build-and-test.yml@main
with:
build-arguments: '-Dversion.org.wildfly.galleon-plugins=${{needs.galleon-plugins-build.outputs.galleon-plugins-version}}'
java-versions: "['11', '17']"
os: "['ubuntu-latest', 'windows-latest']"
maven-repo-name: galleon-plugins-maven-repository
maven-repo-path: galleon-plugins-maven-repository.tar.gz

needs: galleon-plugins-build

wildfly-build-and-test-galleon-layers:
name: Galleon Linux - JDK11
uses: wildfly/wildfly/.github/workflows/shared-wildfly-build-and-test.yml@main
with:
test-arguments: '-Dts.layers -Dts.galleon'
build-arguments: '-Dversion.org.wildfly.galleon-plugins=${{needs.galleon-plugins-build.outputs.galleon-plugins-version}}'
os: "['ubuntu-latest']"
java-versions: "['11']"
maven-repo-name: galleon-plugins-maven-repository
maven-repo-path: galleon-plugins-maven-repository.tar.gz
needs: galleon-plugins-build

wildfly-build-and-test-preview:
name: WildFly Preview - Linux- JDK17
uses: wildfly/wildfly/.github/workflows/shared-wildfly-build-and-test.yml@main
with:
test-arguments: '-Dts.preview'
build-arguments: '-Dversion.org.wildfly.galleon-plugins=${{needs.galleon-plugins-build.outputs.galleon-plugins-version}}'
java-versions: "['17']"
os: "['ubuntu-latest']"
maven-repo-name: galleon-plugins-maven-repository
maven-repo-path: galleon-plugins-maven-repository.tar.gz
needs: galleon-plugins-build