AWS CI/CD code deploy success even if unit test fails in git action | Laravel

185 Views Asked by At

I just set up a CI-CD pipeline from AWS to github for my laravel project. I'm no expert in CI-CD or devops. It appears that code deploy is always success in aws pipeline even if I set a unit test false or test fails. Please see the image.code

You can see the test failed & also deploy succeeded in aws. I don't fully understand how it works. Also can I set conditions maybe in tests that when should github deploy the codes in aws or any idea how the tests works for CI-CD in laravel? Thanks! enter image description here enter image description here

1

There are 1 best solutions below

4
On

trigger aws code-deploy from GitHub action workflow. You Only have CI part in your yml file.

see yml file for GitHub action in here

https://medium.com/thelorry-product-tech-data/amazon-ec2-deployment-complete-ci-cd-pipeline-using-github-actions-and-aws-codedeploy-8a477123ff7e