Skip to content

chore: add docker-compose.yml file to simplify running a local API for tests #153

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

Merged
merged 1 commit into from
Jun 2, 2025

Conversation

Rolv-Apneseth
Copy link
Collaborator

Finishing touches for #117.

This one adds a docker-compose.yml to easily setup a locally hosted version of LanguageTool for running the test suite against. The environment variables are important as the max length is used assumed in the tests, and the Java memory increase was required for me to avoid the service crashing when running the full test suite.

Copy link

codecov bot commented May 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 31.55%. Comparing base (1d460ea) to head (46d75a5).
Report is 1 commits behind head on v3.

Additional details and impacted files
@@           Coverage Diff           @@
##               v3     #153   +/-   ##
=======================================
  Coverage   31.55%   31.55%           
=======================================
  Files          19       19           
  Lines         824      824           
=======================================
  Hits          260      260           
  Misses        564      564           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jeertmans
Copy link
Owner

Hi @Rolv-Apneseth, thanks for your PR! Could you add more details about how to use this configuration for testing? Probably here, for me review to be easier, but also somewhere in the README so people know they can actually use it :-)

@Rolv-Apneseth
Copy link
Collaborator Author

Sure, it's just docker compose up to start it, and I guess cargo test --all-features to run the tests. The latest version of language tool is important for the snapshot tests, so sometimes I just run docker compose up --pull always to make sure it always checks for an update. I'll actually just add that to the compose file though.

Do you want like a whole contributing section? Might do a CONTRIBUTING.md in a separate PR then, or do you just want a short section in the readme

@Rolv-Apneseth Rolv-Apneseth force-pushed the add_docker_compose_file branch from a7596ac to b9a4f0a Compare May 28, 2025 10:19
@Rolv-Apneseth Rolv-Apneseth force-pushed the add_docker_compose_file branch from b9a4f0a to 46d75a5 Compare May 28, 2025 10:49
@jeertmans
Copy link
Owner

Ok got it, it is quite simple!
Good idea for the contributing file

@jeertmans
Copy link
Owner

Hi @Rolv-Apneseth, I'll merge this and add the CONTRIBUTING.md file myself on v3 directly. Thanks!

@jeertmans jeertmans merged commit cc1bcaa into jeertmans:v3 Jun 2, 2025
8 of 9 checks passed
@Rolv-Apneseth
Copy link
Collaborator Author

Hi @Rolv-Apneseth, I'll merge this and add the CONTRIBUTING.md file myself on v3 directly. Thanks!

Alright, no problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants