Skip to content

Commit

Permalink
Merge pull request #93 from ascopes/task/build-on-oldest-maven
Browse files Browse the repository at this point in the history
Add new job to run CI against prerequisite Maven version
  • Loading branch information
ascopes committed Feb 11, 2024
2 parents a34a4d0 + 01df682 commit 13a7a67
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 2 deletions.
34 changes: 33 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:

jobs:
build:
name: Build (Java ${{ matrix.java-version }} on ${{ matrix.os-name }})
name: Build (jdk-${{ matrix.java-version }}/${{ matrix.os-name }}/project-maven-version)
runs-on: ${{ matrix.os-name }}

strategy:
Expand Down Expand Up @@ -50,3 +50,35 @@ jobs:
uses: codecov/codecov-action@v3
continue-on-error: true
if: always()

build-oldest-maven:
name: Build (jdk-11/ubuntu-latest/prereq-maven-version)
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: 11
distribution: 'temurin'
cache: maven

- name: Change Maven version to the prerequisite version
shell: bash
run: |-
version=$(./mvnw help:evaluate -q \
-Dexpression='project.prerequisites.maven' \
-DforceStdout)
./mvnw wrapper:wrapper -Dmaven="${version}"
- name: Build and test
shell: bash
run: ./mvnw -B verify

- name: Publish code coverage
uses: codecov/codecov-action@v3
continue-on-error: true
if: always()
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<packaging>maven-plugin</packaging>

<prerequisites>
<maven>3.8.0</maven>
<maven>3.8.1</maven>
</prerequisites>

<inceptionYear>2023</inceptionYear>
Expand Down
3 changes: 3 additions & 0 deletions src/it/invoker.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,8 @@ invoker.mavenOpts = \
-Dplugin-group-id=${project.groupId} \
-Dplugin-artifact-id=${project.artifactId} \
-Dplugin-version=${project.version} \
-Dmaven.compiler.release=11 \
-Dmaven.compiler.source=11 \
-Dmaven.compiler.target=11 \
${invoker.mavenOpts}
invoker.quiet = false

0 comments on commit 13a7a67

Please sign in to comment.