Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce Dropwizard Metrics integration test #1426

Merged
merged 66 commits into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
4ec0678
Initial metrics integration test
oxkitsune Nov 23, 2023
11d02d4
Integration test script
oxkitsune Nov 23, 2023
d18dd8a
Use integration-test.sh in checkstyle
oxkitsune Nov 30, 2023
d7a3fbe
Use integration-test.sh relative to test dir
oxkitsune Nov 30, 2023
be6d3e5
Run metrics on java 17
oxkitsune Nov 30, 2023
36f8b01
run metrics
oxkitsune Dec 13, 2023
952451c
clarify reason for check exclusion
oxkitsune Dec 13, 2023
2ebd530
add `additional_src_directories` flag
oxkitsune Jan 10, 2024
b6bed86
fix checkstyle integration test script
oxkitsune Jan 10, 2024
3b2a0b4
add matrix to integration test workflow
oxkitsune Jan 10, 2024
713853d
suggestions
oxkitsune Jan 10, 2024
5825498
apply suggestions in init patch
oxkitsune Jan 11, 2024
97989c6
trigger integration-test action
oxkitsune Jan 11, 2024
4dcfb10
temporarily remove condition
oxkitsune Jan 11, 2024
79931df
disable new checks as they cause errors
oxkitsune Jan 24, 2024
4dafc7e
Post-rebase fix
rickie Feb 13, 2024
dddb602
Rename metrics files to drop the version
rickie Feb 13, 2024
0417783
Style improvements
rickie Feb 13, 2024
75eb8d2
Typo
rickie Feb 13, 2024
b9836c6
sync metrics
oxkitsune Mar 1, 2024
78cac86
Only run on GH comment
rickie Mar 6, 2024
1ff1d57
Try to trigger metrics
rickie Mar 6, 2024
51ec7bc
Try to run both variants
rickie Mar 6, 2024
ee00181
Dont analyse generated files
rickie Mar 6, 2024
8b4cba4
Fix metrics init patch
oxkitsune Mar 20, 2024
cc69b87
Try different refaster name patterns
oxkitsune Mar 20, 2024
f793c73
Merge `master` in this branch
rickie Nov 14, 2024
1ac65e9
Fix missed merge conflicts
rickie Nov 14, 2024
54f541a
Checkpoint
rickie Nov 14, 2024
01a97f0
First full version!
rickie Nov 15, 2024
2876cf8
ExcludePaths generated_resources
rickie Nov 15, 2024
1a543bf
More cleanup, less init patch
rickie Nov 15, 2024
78c264b
Simplify init patch further
rickie Nov 15, 2024
aacdbc5
Drop unnecessary args
rickie Nov 15, 2024
7ab842a
Merge master again
rickie Nov 18, 2024
1b9f735
Update error_prone_shared_flags
rickie Nov 18, 2024
ffcca9c
Introduce `shared_error_prone_flags`
rickie Nov 18, 2024
3d557c0
Fix integration test setup
rickie Nov 18, 2024
9359441
Cleanup
rickie Nov 18, 2024
2a8e885
Merge branch 'master' into rossendrijver/metrics_integration_test
rickie Nov 18, 2024
1d77a3a
Dont need this
rickie Nov 18, 2024
b5c51f5
Forgot these
rickie Nov 19, 2024
13d84c3
Drop file
rickie Nov 19, 2024
4c2363c
Improve init patch
rickie Nov 19, 2024
fd5ebbc
Merge branch 'master' into rossendrijver/metrics_integration_test
rickie Nov 19, 2024
6697858
Try to test the IT setup
rickie Nov 19, 2024
d7bf1a7
Test trigger?
rickie Nov 19, 2024
9429021
Revert commit to test GHA
rickie Nov 19, 2024
eb43a77
Try to see if we can make it pass without
rickie Nov 20, 2024
3d7a390
This works locally, well the test passes, but FileRule still seems ig…
rickie Nov 22, 2024
6f5ae5b
This also doesnt work
rickie Nov 22, 2024
d25d84b
Merge remote-tracking branch 'origin/master' into rossendrijver/metri…
Stephan202 Nov 23, 2024
acf14a1
Sync
Stephan202 Nov 23, 2024
998ded9
Whitelist example.com:80
Stephan202 Nov 23, 2024
b31689f
Suggestions (WIP)
Stephan202 Nov 23, 2024
561275a
Suggestions (WIP)
Stephan202 Nov 23, 2024
e441bc3
Doh
Stephan202 Nov 23, 2024
331cea6
Suggestions (WIP)
Stephan202 Nov 24, 2024
18890ff
Suggestions (WIP)
Stephan202 Nov 24, 2024
1753ae9
Merge remote-tracking branch 'origin/master' into rossendrijver/metri…
Stephan202 Nov 26, 2024
10a84d0
Suggestions and improvements
rickie Nov 26, 2024
296f9ee
Tweak
Stephan202 Nov 26, 2024
d27ae54
Run Checkstyle test again
Stephan202 Nov 26, 2024
b0046d3
Merge branch 'master' into rossendrijver/metrics_integration_test
rickie Nov 28, 2024
3734ec6
Revert changes in `run-integration-tests`
rickie Nov 28, 2024
a6bd840
Polish
Stephan202 Nov 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions .github/workflows/run-integration-tests.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# 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
# run. See this example of a dynamic build matrix:
# XXX: Review whether then build matrix should also vary JDK or OS versions.
# XXX: Support `/integration-test [name...]` comment syntax to specify the
# subset of integration tests to 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:
Expand All @@ -17,6 +17,9 @@ jobs:
if: |
github.event.issue.pull_request && contains(github.event.comment.body, '/integration-test')
runs-on: ubuntu-24.04
strategy:
matrix:
integration-test: [ "checkstyle", "metrics" ]
steps:
- name: Install Harden-Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
Expand All @@ -26,6 +29,7 @@ jobs:
allowed-endpoints: >
api.adoptium.net:443
checkstyle.org:443
example.com:80
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added to get unit tests to pass.

github.com:443
objects.githubusercontent.com:443
oss.sonatype.org:443
Expand All @@ -42,12 +46,12 @@ jobs:
- name: Install project to local Maven repository
run: mvn -T1C install -DskipTests -Dverification.skip
- name: Run integration test
run: xvfb-run ./integration-tests/checkstyle.sh "${{ runner.temp }}/artifacts"
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-checkstyle
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
4 changes: 3 additions & 1 deletion integration-tests/checkstyle.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ repository='https://github.com/checkstyle/checkstyle.git'
revision='checkstyle-10.20.1'
additional_build_flags='-Perror-prone-compile,error-prone-test-compile -Dmaven.compiler.failOnError=true'
additional_source_directories='${project.basedir}${file.separator}src${file.separator}it${file.separator}java,${project.basedir}${file.separator}src${file.separator}xdocs-examples${file.separator}java'
shared_error_prone_flags='-XepExcludedPaths:(\Q${project.basedir}${file.separator}src${file.separator}\E(it|test|xdocs-examples)\Q${file.separator}resources\E|\Q${project.build.directory}${file.separator}\E).*'
patch_error_prone_flags=''
validation_error_prone_flags=''
# Validation skips some tests:
Expand All @@ -29,7 +30,8 @@ fi
"${revision}" \
"${additional_build_flags}" \
"${additional_source_directories}" \
"${shared_error_prone_flags}" \
"${patch_error_prone_flags}" \
"${validation_error_prone_flags}" \
"${validation_build_flags}" \
${@}
$@
Loading