Skip to content
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

[Feature Request]: Github Action for checking backend API compliance #905

Open
AndreasHae opened this issue Mar 26, 2022 · 2 comments
Open
Assignees

Comments

@AndreasHae
Copy link

Relevant Scope

Backend specs

Description

Right now, the process of checking API compliance within your CI pipeline (as you should) is a bit tedious to set up.
You have to manually copy the Postman collection and the run-api-tests.sh script and integrate it into your pipeline which involves some trial and error.

Furthermore, once the API spec evolves, there's really no way for me as an implementation maintainer to find out other than periodically checking the repository and copying the new endpoint definitions if they changed.

I believe it's in this project's interest to make this process as frictionless as possible to ensure that implementations are always compliant with the spec.

Describe the solution you'd like

Creating a Github action would be the perfect way to make this process super simple, as it removes the need to manually copy the test files and keep them up to date. The way I imagine it, you could pass the following parameters:

  • Spec version (latest by default)
  • All parameters of test script (base url, email, etc.)

Using a Github action for this purpose could also enable a more complex test suite than a Postman collection because setting it up would not be the maintainers' responsibility anymore, other than including the action in their workflows.

Describe alternatives you've considered

Other CI providers with custom actions like CircleCI could also be considered, but I think Github Actions would be the most obvious choice because most (if not all) realworld implementations are on Github and it's the least hassle to set up.

@geromegrignon
Copy link
Contributor

Hey @AndreasHae,

I agree but couldn't find enough time to work on it.
With the current situation, not only do you need to retrieve the collection but to run it but it requires NodeJS as well.

I'll create a dedicated GitHub Action.

Why would the collection not be the maintainer' responsibility anymore?

@AndreasHae
Copy link
Author

Hi @geromegrignon,

What I meant is that the collection itself would be updated by realworld project members whenever there's an API spec change. This way, developers don't have to manually check for spec changes, they just need to make sure the action is up-to-date, which can be automated by tools like dependabot. Of course it would still be their responsibility to keep the project up-to-date with new API changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants