Skip to content

Commit

Permalink
Merge pull request #271 from jfdenise/main
Browse files Browse the repository at this point in the history
Add WF build and tests to CI
  • Loading branch information
jfdenise authored Nov 22, 2023
2 parents 9fbc530 + 2fa707d commit da19414
Showing 1 changed file with 65 additions and 17 deletions.
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

0 comments on commit da19414

Please sign in to comment.