add building assets and dependencies test

This commit is contained in:
Martin Kiragu
2023-03-02 10:47:45 +03:00
parent 623fb1609b
commit 6ba3b873a2
+28 -6
View File
@@ -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 =~ /.*/'