Skip to content

Commit

Permalink
Split workflows for build and test
Browse files Browse the repository at this point in the history
and use batch file on Windows ...
  • Loading branch information
ascheman committed Feb 5, 2024
1 parent f84b91d commit ca5b9d5
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 31 deletions.
35 changes: 4 additions & 31 deletions .github/workflows/gradle-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Gradle Build and Test
on:
pull_request:
push:
workflow_dispatch: {}
workflow_dispatch:
jobs:
gradle:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -43,34 +43,7 @@ jobs:
name: maven-repo
path: build/maven-repo

test-java-os-mix:
needs: gradle
strategy:
matrix:
os-version: [ ubuntu-latest, macos-14, windows-latest ]
java-version: [ 11, 17, 21 ]
runs-on: ${{ matrix.os-version }}
steps:
- uses: actions/checkout@v3
- name: Download Artifacts
uses: actions/download-artifact@master
with:
name: maven-repo
path: build/maven-repo
- uses: actions/setup-java@v3
- name: Trigger Test Matrix Workflow
uses: benc-uk/workflow-dispatch@v1
with:
distribution: temurin
# Always build with JDK 8 initially
java-version: ${{ matrix.java-version }}
- name: Execute integration test (on Unixes)
if: ${{ runner.os == 'Linux' || runner.os == 'macOS' }}
run: |
uname -a
./gradlew --version
./gradlew integrationTestOnly --scan
- name: Execute integration test (on Windows)
if: ${{ runner.os == 'Windows' }}
run: |
uname -a
./gradlew --version
./gradlew integrationTestOnly --scan
workflow: test-java-os-mix
37 changes: 37 additions & 0 deletions .github/workflows/test-java-os-mix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: HTML Sanity Check Matrix Test
on:
workflow_dispatch: {}

jobs:
test-java-os-mix:
needs: gradle
strategy:
matrix:
os-version: [ ubuntu-latest, macos-14, windows-latest ]
java-version: [ 8, 11, 17, 21 ]
runs-on: ${{ matrix.os-version }}
steps:
- uses: actions/checkout@v3
- name: Download Artifacts
uses: actions/download-artifact@master
with:
name: maven-repo
path: build/maven-repo
- uses: actions/setup-java@v3
with:
distribution: temurin
# Always build with JDK 8 initially
java-version: ${{ matrix.java-version }}
- name: Execute integration test (on Unixes)
# if: ${{ runner.os == 'Linux' || runner.os == 'macOS' }}
run: |
uname -a
./gradlew --version
./gradlew integrationTestOnly --scan
# - name: Execute integration test (on Windows)
# if: ${{ runner.os == 'Windows' }}
# run: |
# uname -a
# gradlew --version
# gradlew integrationTestOnly --scan

0 comments on commit ca5b9d5

Please sign in to comment.