Introduce Dropwizard Metrics integration test #2866
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# If requested by means of a pull request comment, runs integration tests | |
# against the project, using the code found on the pull request branch. | |
# XXX: Generalize this to a matrix build of multiple integration tests, | |
# possibly using multiple JDK or OS versions. | |
# XXX: Investigate whether the comment can specify which integration tests run. | |
# See this example of a dynamic build matrix: | |
# https://docs.github.com/en/actions/learn-github-actions/expressions#example-returning-a-json-object | |
name: "Integration tests" | |
on: | |
pull_request: | |
permissions: | |
contents: read | |
jobs: | |
run-integration-tests: | |
name: On-demand integration test | |
runs-on: ubuntu-24.04 | |
strategy: | |
matrix: | |
integration-test: [ "metrics" ] | |
# XXX: Enable. | |
# integration-test: [ "checkstyle", "metrics" ] | |
steps: | |
- name: Install Harden-Runner | |
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 | |
with: | |
disable-sudo: true | |
egress-policy: block | |
allowed-endpoints: > | |
api.adoptium.net:443 | |
checkstyle.org:443 | |
example.com:80 | |
github.com:443 | |
objects.githubusercontent.com:443 | |
oss.sonatype.org:443 | |
raw.githubusercontent.com:443 | |
repo.maven.apache.org:443 | |
repository.sonatype.org:443 | |
- name: Check out code and set up JDK and Maven | |
uses: s4u/setup-maven-action@382542f77617f34e56bf83868920a4d45b7451e7 # v1.16.0 | |
with: | |
java-version: 17.0.13 | |
java-distribution: temurin | |
maven-version: 3.9.9 | |
- name: Install project to local Maven repository | |
run: mvn -T1C install -DskipTests -Dverification.skip | |
- name: Run integration test | |
run: xvfb-run "./integration-tests/${{ matrix.integration-test }}.sh" "${{ runner.temp }}/artifacts" | |
- name: Upload artifacts on failure | |
if: ${{ failure() }} | |
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 | |
with: | |
name: "integration-test-${{ matrix.integration-test }}" | |
path: "${{ runner.temp }}/artifacts" | |
- name: Remove installed project artifacts | |
run: mvn dependency:purge-local-repository -DmanualInclude='${project.groupId}' -DresolutionFuzziness=groupId |