Skip to content

Build and test against JDK 21 instead of JDK 20 #21

Build and test against JDK 21 instead of JDK 20

Build and test against JDK 21 instead of JDK 20 #21

name: On-demand integration test
on:
# run action every time a new comment is created
issue_comment:
types: [ created ]
permissions:
contents: read
jobs:
on_demand_integration_test:
name: On-demand integration test
# Only run the integration test if the created comment is on a pull request
# and contains the string `/integration-test`
if: |
github.event.issue.pull_request &&
contains(github.event.comment.body, '/integration-test')
# XXX TODO: Device matrix?
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1
with:
submodules: 'recursive'
# ensure we fetch ALL commits and tags!
fetch-depth: '0'
persist-credentials: false
- name: Set git config
run: |
git config --global user.email "cody@picnic.tech"
git config --global user.name "cody"
- name: Set up JDK
uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # v3.13.0
with:
# XXX TODO: java version matrix?
java-version: 17.0.8
distribution: temurin
cache: maven
- name: Display build environment details
run: mvn --version
- name: Install error-prone-support snapshot
run: mvn -T1C install -DskipTests -Dverification.skip
- name: Run integration test
# ensure this script is executed in the integration-tests directory
working-directory: ./integration-tests
run: bash ./run.sh
- name: Upload diff artifacts
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
name: integration-test-diffs
path: |
./integration-tests/checkstyle-checkstyle-10.9.3-expected-changes.patch
./integration-tests/checkstyle-checkstyle-10.9.3-expected-warnings.txt