-
Notifications
You must be signed in to change notification settings - Fork 2
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: add test_api job #220
ci: add test_api job #220
Conversation
Not sure how you got this error, but in the test run I see |
This comment was marked as resolved.
This comment was marked as resolved.
This comment has been minimized.
This comment has been minimized.
I think to test setup is working now. What do you need to test at this stage? There are a few higher level groups of checks.
See: https://schemathesis.readthedocs.io/en/stable/cli.html#how-are-responses-checked And you can select all of them. Which ones do you need? If you select all, you get a lot of errors. |
How would you like to receive the output of the tests? Are the logs in GitHub actions sufficient? Do you need custom summaries? If you register with schemathesis.io, they can generate reports for you and they will post comments in PRs. It is your decision, if you want to use a third-party provider for testing the API. |
What do you think? Do you know what you to test? Should this be not too strict, tests green and be merged soonish? Then you have the skeleton to test the API, additional stricter testing can then be enabled as a next step. If you test "everything" now, the tests are red and you will not be able to merge without a lot of work fixing the found issues. |
I have set up a dracor.org organization at https://app.schemathesis.io/organizations/dracor-org/. @afuetterer I could add you as a member if you let me know your schemathesis account or email address. So we could use schemathesis.io to generate reports on test runs. I have briefly tried to do a local test run following their documentation but wasn't able to upload the result to schemathesis.io. Maybe you could figure out how to do it. |
For the PR to be merged we should arrive at some minimal set of tests that passes. I haven't looked into schemathesis enough to say which tests that could be. Can you suggest what would be possible to test successfully at the moment_ |
If you want to use the schemathesis reporting, fine. Then "report: false" should be "report: true", and you need to set the token as a secret. Then it should work. |
The And this actually tests a lot of endpoints already! |
Tests are passing. |
Could you please, share what was the issue during uploading? I am eager to fix it or either update the docs. In any event I’d be happy to work on any improvements you might need from the Schemathesis side :) |
What do you say @cmil? |
I think the problem was that the report size was too large and I may just have missed the warning about this. I have now been able to upload reports. Although I have only managed to do this with my personal account. Is there a way to upload the reports to the dracor-org organisation? I thought maybe I need an organization token but couldn't figure out how to obtain one. |
Thanks a lot @afuetterer. I added a few minor things, mostly cosmetic or, in the case of schemathesis.sh, as a memory aid. I think that's a great base to build on and extend the tests. Just for the record, there was one runtime error in https://github.com/dracor-org/dracor-api/actions/runs/7438586065/job/20237499097, which I was not able to reproduce locally or in later workflow runs:
I can't see how any of my changes would have caused or fixed this. So I assume it was a temporary glitch and think that we are ready to merge. 🎉 |
Awesome. If you enjoy using schemathesis for the testing, consider giving them a star on GitHub. Also maybe this is worth a blog post and/or some other sort of publication? |
I gave them a star. If you feel to write a blog post, go ahead. You were the main implementer of this after all. :) |
Sorry for the delay! Thank you for sharing - I increased the limits for anonymous uploads, for registered users they are 10MB (let me know if it is not enough). There are organization tokens, but I didn't add a UI for them just yet. Gimme a few days and it will be there. |
I also observed such a sporadic failure on multi-worker test execution (the test run uses 2 workers), and it likely comes from the Hypothesis framework (which Schemathesis uses under the hood). I didn't check it in detail but in my case, it was resolved after updating the Hypothesis version. |
Thank you! That's great and should be more than enough for now.
Looking forward to the new feature. But no rush! |
I saw a few more failures as well. Would an update of the Schemathesis Github action then fix this in the future? We are currently using version 1.0.3 which seems to be the latest. |
Proposed Changes
Add a CI job that:
Requirements
Problems
I cannot start the frontend service withdocker-compose up
.If I rundocker-compose up --detach api fuseki metrics
to not start the frontend:Tasks
compose.t.yml
ci.yml
workflow fileAdd run: docker images to list used images
Related issue: #219