From 6ba3b873a2b6fc1cef9ff84eb6692b0e69fa26c8 Mon Sep 17 00:00:00 2001 From: Martin Kiragu Date: Thu, 2 Mar 2023 10:47:45 +0300 Subject: [PATCH] add building assets and dependencies test --- .gitlab-ci.yml | 34 ++++++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7ed2508f..ef13f926 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,7 +1,8 @@ image: php:7.4 stages: - service_build - - front_end_build + - node + - building_assets - database - unit_test - acceptance_test @@ -28,7 +29,7 @@ before_script: # Install PDO MySQL extension - docker-php-ext-install pdo_mysql - #install php depandancies + #install php dependencies - docker-php-ext-install mbstring xml zip gd # Install composer package manager @@ -58,10 +59,21 @@ composer_php: - if: '$CI_COMMIT_BRANCH =~ /.*/' #build the UI -node_gulp: - stage: front_end_build +#node installation +npm: + stage: node script: - npm install # Install npm dependencies + rules: + - if: '$CI_COMMIT_BRANCH =~ /.*/' + + +#building assets +building_assets: + stage: building_assets + dependencies: + - npm + script: - gulp build # Build assets rules: - if: '$CI_COMMIT_BRANCH =~ /.*/' @@ -80,12 +92,22 @@ database: - php artisan key:generate - php artisan migrate:fresh - php artisan db:seed - - mysqldump --host="${DB_HOST}" --user="${MYSQL_USER}" --password="${MYSQL_PASSWORD}" "${MYSQL_DATABASE}" > db.sql + - php artisan test + rules: + - if: '$CI_COMMIT_BRANCH =~ /.*/' + +#mysql +unit_test: + stage: unit_test + + dependencies: + - database + script: + - php artisan test rules: - if: '$CI_COMMIT_BRANCH =~ /.*/' -