Skip to content

♻ Refactor items and services endpoints to return count and data, and add CI tests#599

Merged
tiangolo merged 8 commits intofastapi:masterfrom
estebanx64:docker-test
Feb 25, 2024
Merged

♻ Refactor items and services endpoints to return count and data, and add CI tests#599
tiangolo merged 8 commits intofastapi:masterfrom
estebanx64:docker-test

Conversation

@estebanx64
Copy link
Contributor

Refactor items and services endpoints and added support to run pytest within docker-compose and actions

users = session.exec(statement).all()
return users

return UsersOut(data=users, count=count)

Choose a reason for hiding this comment

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

why?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Front end needs to know how many items are in database to be able to create a pagination

@tiangolo tiangolo changed the title ♻️ [EDIT]: Refactor items and services endpoints and added support to run pytest ♻ Refactor items and services endpoints to return count and add CI tests Feb 25, 2024
@tiangolo tiangolo added the feature New feature or request label Feb 25, 2024
@tiangolo tiangolo changed the title ♻ Refactor items and services endpoints to return count and add CI tests ♻ Refactor items and services endpoints to return count and data, and add CI tests Feb 25, 2024
@tiangolo
Copy link
Member

Great, thanks! I updated it a bit, mainly to match the previous GitLab CI config, mainly to avoid race conditions between migrations running and the tests starting before the app/DB is ready. This is ready! 🚀

@tiangolo tiangolo merged commit f41f443 into fastapi:master Feb 25, 2024
gusevyaroslove pushed a commit to gusevyaroslove/fastapi-template that referenced this pull request Aug 4, 2024
… add CI tests (fastapi#599)

Co-authored-by: Esteban Maya Cadavid <emaya@trueblue.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants