Skip to content

Commit

Permalink
ci: test with oldest Maven version
Browse files Browse the repository at this point in the history
  • Loading branch information
sebthom committed Sep 6, 2024
1 parent cf38f1c commit a824492
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
23 changes: 20 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,17 @@ jobs:
maven-build:
###########################################################
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.experimental }}
strategy:
fail-fast: false
matrix:
include:
- maven_version: mvnw # as defined in .mvn/wrapper/maven-wrapper.properties
may_create_release: ${{ github.ref_name == 'main' }}
experimental: false
- maven_version: 3.6.3 # oldest supported Maven version
may_create_release: false
experimental: false


# https://docs.github.com/en/actions/using-jobs/using-concurrency
Expand Down Expand Up @@ -108,7 +119,7 @@ jobs:
with:
path: |
~/.m2/wrapper
key: ${{ runner.os }}-${{ runner.arch }}-mvn-binary-${{ hashFiles('.mvn/wrapper/maven-wrapper.properties') }}
key: ${{ runner.os }}-${{ runner.arch }}-mvn-binary-${{ matrix.maven_version }}-${{ hashFiles('.mvn/wrapper/maven-wrapper.properties') }}


- name: "Cache: Restore"
Expand All @@ -135,9 +146,15 @@ jobs:
mv -v ~/.m2/repository $RESTORED_REPO_PATH
echo "RESTORED_REPO_PATH=$RESTORED_REPO_PATH" >> $GITHUB_ENV
- name: Set Maven version [${{ matrix.maven_version }}]
run: |
if [[ "${{ matrix.maven_version }}" != "mvnw" ]]; then
chmod u+x mvnw
./mvnw -ntp wrapper:wrapper -Dmaven=${{ matrix.maven_version }}
fi
- name: "Test with Maven 🔨"
if: ${{ github.ref_name != 'main' || env.ACT }}
if: ${{ !matrix.may_create_release || env.ACT }}
env:
GITHUB_USER: ${{ github.actor }}
GITHUB_API_KEY: ${{ github.token }}
Expand All @@ -147,7 +164,7 @@ jobs:
- name: "Build with Maven 🔨"
if: ${{ github.ref_name == 'main' && !env.ACT }}
if: ${{ matrix.may_create_release && !env.ACT }}
env:
DEPLOY_SNAPSHOTS_TO_GITHUB_BRANCH: true
GITHUB_USER: ${{ github.actor }}
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
SPDX-ArtifactOfProjectHomePage: https://github.com/vegardit/vegardit-maven-parent
check for new dependency/plugin updates using:
mvn -U versions:display-dependency-updates versions:display-plugin-updates
mvn -U -ntp versions:display-dependency-updates versions:display-plugin-updates
plugin announcements: https://blogs.apache.org/maven/
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
Expand Down

0 comments on commit a824492

Please sign in to comment.