Skip to content

Commit

Permalink
G2-1542 Enable matrix testing
Browse files Browse the repository at this point in the history
  • Loading branch information
gdgib committed Oct 22, 2024
1 parent 381f3a8 commit 14d06c3
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,23 @@ on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
max-parallel: 3
matrix:
os: [ubuntu-latest, windows-latest]
java_version: [17, 21]
runs-on: ${{ matrix.os }}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.os }}-${{ matrix.java_version }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: 17
java-version: ${{ matrix.java_version }}
cache: 'maven'
- name: Build with Maven
# Maven deploy on changes (or manual run) to master, otherwise just package it
run: mvn -s "${GITHUB_WORKSPACE}/.github/workflows/maven-settings.xml" -B ${{ (((github.event_name == 'push') || (github.event_name == 'workflow_dispatch')) && (github.ref == 'refs/heads/master')) && 'deploy' || 'package' }} --file pom.xml -Prelease,release-snapshot
run: mvn -s "${GITHUB_WORKSPACE}/.github/workflows/maven-settings.xml" -B ${{ (((github.event_name == 'push') || (github.event_name == 'workflow_dispatch')) && (github.ref == 'refs/heads/master') && (matrix.os == 'ubuntu-latest') && (matrix.java_version == '17')) && 'deploy' || 'package' }} --file pom.xml -Prelease,release-snapshot
env:
GITHUB_TOKEN: ${{ github.token }}

0 comments on commit 14d06c3

Please sign in to comment.