Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
October 12, 2020 03:40 pm GMT

Benefits of using Cypress in GitHub actions

If you work with anything related to frontend and you havent tried Cypress yet, I highly suggest you give it a try.
But, if you use Cypress and dont have a CI/CD pipeline set up yet, read forward for the reasons why using GitHub actions for it might be valuable.

GitHub actions

The docs say:

Automate, customize, and execute your software development workflows right in your repository with GitHub Actions.

Cypress GitHub action - installation

Read these:

Benefits of integration

Prevention of merging broken code into the target branch

  • by leveraging code status checks of GitHub, there is the potential to list run Cypress checks and block PR merge if all checks are not passing

status checks
Image source: cypress docs

Software stability

  • as the status checks prevent merging broken code, there is potentially greater awareness across the development team towards software quality and stability
  • another potential outcome is that the team write more (and meaningful) tests because they see how much their code and tests have an impact on the complete codebase

Tracking code coverage

Easier onboarding of new developers to project standards

  • if a new team member has not used Cypress before, he/she will potentially see the value of tests sooner if they're visible in the CI and they're not required to be run manually

Developers ownership of CI/CD

  • In some organizations, CI/CD pipelines are the responsibility of the DevOps team
  • Delegating some complex pipelines or asking help from the DevOps team is great for collaboration, but it's also really valuable skill knowing setting up the basic CI/CD flows
  • I personally think this is really important because the developer can then tweak the CI/CD pipeline to the project's needs and potentially easily experiment with new features of relevant technologies on the projects (e.g. Cypress GitHub actions)

Summary

This post focuses (on very high level) on the integration of Cypress and GitHub actions, but can easily be applied to other testing frameworks such as Jest and other CI/CD services such as CircleCI or TravisCI.

I personally found it very convenient to use it with GitHub actions because it's baked in the GitHub itself, but you can freely use other services that support this kind of automated flows.

Happy testing!


Original Link: https://dev.to/bornfightcompany/benefits-of-using-cypress-in-github-actions-53fk

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To