I've been tasked with investigating Continuous Integration, and one of the things I am looking at is Gitlab CI.
I have set up Gitlab, Gitlab CI and two runners, but I am absolutely stuck on how to really use this. How could I do something like create a unit test, push that to the repo, and have one of the runners test it?
Or am I completely missing the point here? I'm new to this CI stuff (as in, I was asked to do this yesterday and that's the first time I've come in contact with CI) so if I'm missing the point, please let me know and point me towards some resources.
Thanks a lot.
all tiers. GitLab CI/CD is a tool for software development using the continuous methodologies: Continuous Integration (CI) Continuous Delivery (CD)
CI & CD – An IntroductionContinuous Integration is a development workflow in which multiple developers continuously merge their code changes into a common, shared code repository. This is usually combined with code testing.
A pipeline is usually triggered by a source code repository. Changes in code activate a notification in the CI/CD pipeline tool, which operates the corresponding pipeline. Other triggers you might see frequently include user-initiated or automatically scheduled workflows, as well as results of other pipelines.
Turns out that in the settings for either the runners or the repo in the CI panel, there is a scripts window. This can be used to directly execute shell commands, such as phpunit -c /path/to/tests
, and will work out whether the tests have failed or passed.
I think this might be due to PHPUnit outputting to stderr
instead of stdout
, but I don't really know - not part of the scope so I haven't looked into it yet.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With