DEV Community

Discussion on: All you need to know about CI/CD as Web Developer (DevOps)

Collapse
 
joelbonetr profile image
JoelBonetR 🥇 • Edited

Well you are free to add unit tests to your projects, then end to end tests and finally integration tests. You also can run end to end tests as integration tests. For example setting up a command to run tests on the deployment machine (docker) raised on your CI script, so you can stop the process and throw some output about what had been wrong, so if you integrated this tests either you'll never have untested code inside the production flow or you'll not be able to deploy into production, so you'll need to fix the bugs and re-run the tests before your code can be pushed or deployed into production.
You are meant to stablish a test environment from Develop branch (or any other that deals a feature) so you'll detect any issue before pushing your code into develop. There are many workarounds and you need to find which is better for you depending on the company needs, feature needs and team size. If it's only you there's no much to worry about... You'll need to fix the bugs at this moment by yourself anyway, so you can work against develop and run integration tests here, if it's a large team you probably want to run the tests before merging your feature into develop

Collapse
 
mattjnewberry profile image
Matt Newberry

Thank you for the reply! A lot of interesting points to takeaway