This is the first time I use gitlab CI, so if there are some observations regarding the configuration it would be great to hear them
I have this configuration of CI pipeline for a laravel project in gitalb, in it, I just run the tests suits with PHPUnit:
image: php:7.2
cache:
paths:
- vendor/
- node_modules/
before_script:
- apt-get update -yqq
- apt-get install git libzip-dev libcurl4-gnutls-dev libicu-dev libmcrypt-dev libvpx-dev libjpeg-dev libpng-dev libxpm-dev zlib1g-dev libfreetype6-dev libxml2-dev libexpat1-dev libbz2-dev libgmp3-dev libldap2-dev unixodbc-dev libpq-dev libsqlite3-dev libaspell-dev libsnmp-dev libpcre3-dev libtidy-dev -yqq
- docker-php-ext-install mbstring pdo_mysql curl json intl gd xml zip bz2 opcache bcmath
- pecl install xdebug
- docker-php-ext-enable xdebug
- curl -sS https://getcomposer.org/installer | php
- php composer.phar check-platform-reqs
- php composer.phar install
- cp .env.testing .env
- php artisan key:generate
- php artisan config:clear
test:
script:
- php vendor/bin/phpunit --coverage-text --colors=never
when the test is triggered it took a duration of 12 minutes 20 seconds is there a way to use caching to speed up the job?