Closed muelldlr closed 1 year ago
I have looked at the existing tests and thanks that it is better to rewrite the tests. Parts of the old tests are reused where possible.
To iterate faster with test cases, the tests can be tested apart from the git workflow with docker-compose. Once the setup is in place, the tests can then be easily adapted for GIT CI.
All tests are executed under tests/
. Just have a look at the file tests/test_graph_creator/test_simple_init.py
. As you can see, the whole thing is written a bit simpler, so you can quickly write new tests.
The tests can be run with docker-compose up pytest
. Give it a try and let me know what you think.
The issue we discussed is related to the pipeline when we commit to github (previsously to gitlab) where you refer in your comment "once the setup is in place". as far as I remember thet pytests were there and supposidly running. However, it is good to add how to run these tests into our readme.
This issue should be divided into 2 parts:
[x] update test cases to match the latest version of cag and
[x] fix the setup to be adapted to GIT CI
I've set up the GitHub CI already on December last year. See : https://github.com/DLR-SC/corpus-annotation-graph-builder/blob/main/.github/workflows/main.yml. We have even talked about it then...
as far as I remember thet pytests were there and supposidly running. You said recently that the tests never quite worked. Also makes more sense since they were written for an old version of CAG.
@muelldlr yes of course I remember this, in december you created a CI for the CAG sample project. AFAIR you set it up for the sample project, right? If yes, I am not discussing here the sample project... This is another matter.
Just to make sure we are on the same page: I am talking about running pytest when we have a git push - the tests were hanging and not running They were running at some point on GitLab whenever there is a git push and they stopped working on GitLab. Now that we moved to GitHub, we can tackle the issue here.
yes of course I remember this, in december you created a CI for the CAG sample project. AFAIR you set it up for the sample project, right? If yes, I am not discussing here the sample project... This is another matter.
Not sure what you mean by example project. But from my side, the CI applied to the project in general. As far as I can remember, we had left it deactivated for the time being.
Just to make sure we are on the same page: I am talking about running pytest when we have a git push - the tests were hanging and not running They were running at some point on GitLab whenever there is a git push and they stopped working on GitLab. Now that we moved to GitHub, we can tackle the issue here.
No, that is clear. I only made the local test-setup so that one could quickly write and run new tests. So to speak, as an intermediate step.
The first tests are under tests/test_graph_creator/test_simple_init.py
The pytest are now running on GitHub at workflow dispatch
(so you can start the tests manually from the website), push
and at pull request
.
Rewrite pytests in order to achieve minimum test coverage (for now)