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

First pass at containerizing unit tests #35

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cappadona
Copy link

@cappadona cappadona commented May 12, 2021

Run docker-compose build to try it out.

We should probably create a separate GitHub Actions workflow to run the
tests so we can have that as a separate check that runs prior to the
deploy workflow. Another benefit of this approach is that we can be much
more liberal with the triggers for the tests workflow (i.e. any push).

Run `docker-compose build` to try it out.

We should probabaly create a separate GitHub Actions workflow to run the
tests so we can have that as a separate check that runs prior to the
deploy workflow. Another benefit of this approach is that we can be much
more liberal with the triggers for the tests workflow (i.e. any push).
@cappadona cappadona self-assigned this May 12, 2021
@cappadona cappadona mentioned this pull request May 12, 2021
Copy link

@fereira fereira left a comment

Choose a reason for hiding this comment

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

This looks fine. I have found a way to integrate checkstyle into eclipse and have been fixing some indenting issues using that. I don't know if we'll ever come to a consensus on style preferences such as the use of tabs vs. spaces, number of spaces for indent, etc. But hopefully review changes won't be changing changestyle preferences that I'm using.

@cappadona
Copy link
Author

Thanks @fereira. Were you able to run the tests outside of the containers (your usual routine) when on this branch as well?

I have no style preference when it comes to Java beyond consistency and will follow your lead. I noticed you included a .checkstyle in your last PR. Does that provide everything needed to ensure consistency if integrate checkstyle with my IDE?

@fereira
Copy link

fereira commented May 13, 2021

I haven't actually tried running the tests yet. I'll do that when I go upstairs in about 15 minutes. The .checkstyle is only for eclipse integration. The google_check.xml file which defines the styles criteria is built into a jar file and can't be edited. I had to copy it to an external file which I've modified a bit. It's pretty strict and I don't always agree with some of the changes it wants to make. I can provide a copy but it configuring it with the eclipse plugin isn't automatic.

@cappadona
Copy link
Author

Ah...good to know. If you can share it when you get a chance, that would be great and then I'll look into integrations on my end.

@fereira
Copy link

fereira commented May 13, 2021

I have tested this with and without a container. All tests pass as long as the buildDir is set to "."

@cappadona
Copy link
Author

Thanks @fereira.

I have . as the default value for the buildDir ARG in the Dockerfiile. I considered not adding this as an environment variable in .env.example or passing it from docker-compose.yaml since it's only needed as part of the build artifact so tests can be run, but I wasn't really sure how you were using it with application.properties when running tests, so I decided to tread lightly 😄 with my first pass.

@fereira
Copy link

fereira commented May 18, 2021

What is the status of this PR? It includes changes to the Configuration listener that I also need to modify for #26

@cappadona
Copy link
Author

I still consider it a draft until we have a separate GA workflow for tests. You should proceed freely with your PR to address #26 whenever you're ready.

@cappadona cappadona mentioned this pull request May 19, 2021
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