Full Stack Software Development Blog
Using the free plan for CircleCI to build and run tests.
Here were the steps I followed
Chose the CircleCI free plan and use my github credentials to log into CircleCI.
Chose the texastoc-v2-spring-boot github repo for CircleCI to use. CircleCI added a key to this repo.
Followed the CircleCI directions to
- add a .circleci directory to my project.
- add a config.yml in the .circleci directory for a Java maven project
Now when I push to any branch CircleCI it downloads dependencies, compiles and run the tests.
Of course there were problems :)
Problem 1
My Java project is split into two modules: application and integration. That way I keep my integration tests separate from the application code. The integration module has a dependency on the application module.
I did not have a problem running the tests locally either in IntelliJ or using maven on the command line. But CircleCI choked on the integration module having a dependency on the application module. CircleCI actually wanted the application module as a library for the integration module to use.
I changed the config.yml so that the application module created a library.
Problem 2
When CircleCI attempted to run the test there was an obscure error.
I followed the instructions to add an ssh key to github which allowed me to run CircleCI in ssh mode. I was able to ssh into the build and look at the dump file. I googled the error and found a workaround that I added to my maven pom.xml.
Of course I added a comment to the pom.xml to a link to the stackoverflow solution to the file.
https://stackoverflow.com/questions/50661648/spring-boot-fails-to-run-maven-surefire-plugin-classnotfoundexception-org-apache
No comments:
Post a Comment