Configure PHPUnit with Continuous Gitlab Integration

I have been tasked with exploring continuous integration, and one of the things I'm looking at is Gitlab CI.

I installed Gitlab, Gitlab CI and two runners, but I am absolutely fixated on how to really use this. How can I do something like creating a unit test, click on the repo, and ask one of them to check?

Or am I completely misunderstood here? I am new to this CI stuff (like, in the past, I was asked to do this yesterday, and that the first time I came in contact with CI), so if I don’t have enough sense, please let me know and tell me some resources.

Many thanks.

+8
git gitlab unit-testing continuous-integration phpunit
source share
2 answers

It turns out that there is a script window in the settings for runners or repos in the CI panel. This can be used to directly execute shell commands, such as phpunit -c /path/to/tests , and will determine if phpunit -c /path/to/tests failed or failed.

I think this may be due to the fact that PHPUnit prints to stderr instead of stdout , but I really don’t know - it’s not part of the field, so I have not studied it yet.

+6
source share

You ask a rather broad question here. You have been instructed to learn about CI. You have GitLab CI and you do not know how to use it. I am going to answer first to ask if you understand the difference between the execution of the assembly and the script? Before sending the HTTP content, PHP is executed as a preliminary process on the web server. This is not an assembly. Java or C ++ will be compiled and built. I would advise you to take a look at open source SCOS, but then I realized that this is for compiled collections.

My second question is: do you use a version control repository? If so, which one? For PHP, I can use Ruby and write my own continuous integration tools. I'm not quite sure. Answer my questions. I would like to continue this discussion and help you solve this problem with excellence.

+1
source share

All Articles