Skip to content

Raise required Java version to 17 #1414

Raise required Java version to 17

Raise required Java version to 17 #1414

#
# Part one of two stage process to update PRs with pitest data when accepting PRs from untrusted forks.
#
# The jobs will run the mutation analysis, but the token supplied by gtihub does not have write access.
# The results are therefore stored as an artifact which will be used to update the PR in the second stage.
#
# Projects where PRs come from the same repo can use a simpler single stage process.
#
# see https://blog.pitest.org/pitest-pr-setup/
#
name: Receive
# read-only repo token
# no access to secrets
on:
pull_request:
env:
MAVEN_ARGS: -B -V -ntp -e -Djansi.passthrough=true -Dstyle.color=always
jobs:
store-pitest-feedback:
# Only run on forked repos.
if: github.event.pull_request.head.repo.full_name != github.repository
runs-on: ubuntu-latest
steps:
- name: Checkout project
uses: actions/checkout@v4
with:
# important to set a fetch depth of 2. By default the checkout action make no history available
fetch-depth: 2
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '21'
cache: 'maven'
- name: run pitest
# pitest has been bound to a profile called pitest for normal running
# we add config to analyse only changes made within a PR and treat surviving mutants as check errors
# failWhenNoMutations is unset in the pom, as otherwise PRs that do not affect java code would fail
run: >
./mvnw $MAVEN_ARGS -Ppitest -Dfeatures="+GIT(from[HEAD~1]), +gitci" test
- name: aggregate files
run: >
./mvnw $MAVEN_ARGS -f assertj-core/pom.xml -Ppitest pitest-git:aggregate
- name: upload results
uses: actions/upload-artifact@v4
with:
name: pitest
path: target/assertj-core/pit-reports-ci/