Hi everyone, I would like to ask you a few questions (hoping I'm not totally off the mark).
We have a little "CICD" and I have to improve it. I'm a junior so I'm a little bit confused with some informations I've found.
Indeed, we have a simple system : git, test servers and a production server.
We have configured pipelines in order to be able to launch our unit tests and then trigger the delivery of the files to the server concerned (the delivery in production is totally manual for the moment).
During the merge in the branch corresponding to the concerned server, the steps are the following:
- the unit tests are launched as this :
- apt-get update && apt-get install -y unzip libpng-dev zlib1g-dev libzip-dev
- docker-php-ext-install gd zip
- composer install
- composer require --dev mockery/mockery
- ./vendor/bin/phpunit ./tests --testdox --colors=always
- once this step is over, a bash script is called
- this bash script allows to update the git repository and the dependencies (npm and composer in particular). So this command is launched :
'git reset --hard && git checkout $branch_name && git pull' "Update Git repository"
My questions are :
Is it possible to do these steps without having the .git file on the concerned server ?
Is it recommended or not to use git in a CICD ?
Is it possible to run unit tests without installing php unit (via composer) ?
Thanks for your time 