-
Notifications
You must be signed in to change notification settings - Fork 10
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
CI/CD Fix unit test workflow #441
Conversation
Also renamed the GitHub workflow as its main purpose is to run the tests (and not just creating the codecov report)
6167afc
to
c8bff01
Compare
96e44cd
to
b87a18d
Compare
- Update checkout action to version v3 - Use new docker layer caching version - Simplify commands to handle docker compose shell commands - Update codecov action
b87a18d
to
924f11d
Compare
Hi @henrixapp, what is the "reindex sunspot" task used for, which you've introduced here? Why do we need it?
Furthermore, I've just noticed that I replaced
Based on this, |
I think it should be ok to merge this directly to |
Hi @Splines,
Sunspot is used for indexing the data and providing search results. The reindexing has to be triggered to index the test data, ingested in the step before.
I can not remember this directly. As the operations are altering the volumes/data of the database, I found it more convenient
I would suggest keeping the direction of merging clean, because otherwise you will have to sync between Finally, let's take a look on what you try to achieve: You want the tests to be passing, to get that ✅ . You commented out the tests that are failing, achieving your goal, but I would suggest going a different route, fixing the setup/environment error. If we take a look at the logs of a failing job, we see that the unit test fails due to a
So apparently we do not build the manifest file.
I use https://github.com/nektos/act to run actions locally and the tests passed on |
True, fair enough ;)
Yes, especially for the "release" branch
Thanks for also giving me the fix, will try this out and commit. I overlooked this and thought that some tests were just not correct.
Wow, didn't know about that project, thank you, will try it out. This should render ugly force pushes (just to trigger the pipeline) unnecessary. |
(activate them again) This reverts commit 89d0f35.
Codecov Report
@@ Coverage Diff @@
## mampf-next #441 +/- ##
==============================================
+ Coverage 65.44% 66.68% +1.24%
==============================================
Files 302 311 +9
Lines 8965 9350 +385
==============================================
+ Hits 5867 6235 +368
- Misses 3098 3115 +17
... and 6 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
@henrixapp Apparently, removing webpacker from the dev dependencies of the I've also added a yarn installation to the Dockerfile:
|
Cherry-picked from 71fc084
You are using the Maybe the docker-compose setup in run_tests should be used. |
Now, preparation for tests is working, however webpacker does not seem to be installed correctly (probably configuration file is not taken into account). Thus, the tests now fail, since the files are not bundled correctly... Also see rails/webpacker#522 for more ideas ;) |
@Splines the problem is that the Dockerfile in run_tests does not install the js with |
(instead install yarn dependencies in Dockerfile)
This SO question might be relevant as it's discussing the same error we get currently:
Edit: Wow, just noticed this is the exact same error we had in the beginning 😥 |
Maybe compiling test packs to a separate directory is a problem? See
|
See installation instructions of official docs: https://github.com/rails/webpacker/tree/5-x-stable#installation
This could also be related. Will try this in the next commit. |
@henrixapp @christian-heusel Ok, I think I'm a bit stumped on this one (@christian-heusel I'm mentioning you as git blame tells me you worked on the Dockerfiles I'm currently working (despairing) on). Somehow,
I think a quick and dirty solution for this would be fine, as we will eventually replace webpacker anyways, see #454. |
Closed in favor of #472 |
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Old:
Improve the unit test GitHub Actions workflow and get it to run without failures. To do so, I temporarily disabled failing unit tests. These should be fixed according to issue #442
Edit:
This PR will fix the unit test workflow. Other than originally stated, it will not disable any unit tests.