Created
January 2, 2022 09:34
-
-
Save mkdesignn/b47473094b48e35ee311c457d580390a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
image: php:7.4-fpm | |
pipelines: | |
default: | |
# Not needed unless you're doing feature tests. | |
# - step: | |
# name: Build | |
# image: node:8.9.4 | |
# caches: | |
# - node | |
# script: | |
# - npm install | |
# - npm run prod | |
# artifacts: | |
# - public/** | |
- step: | |
name: Test | |
caches: | |
- composer | |
artifacts: | |
- storage/** | |
- vendor/** | |
- public/** | |
- .env | |
script: | |
#Update Image | |
- apt-get update | |
#Install Zip | |
- apt-get install -qy zlib1g-dev zip unzip libzip-dev libpq-dev | |
- pecl install pcov && docker-php-ext-enable pcov | |
- docker-php-ext-install zip | |
#Install Git | |
- apt-get install -qy git | |
- apt-get install -qy curl | |
#Install MySql | |
- docker-php-ext-install pdo pdo_pgsql | |
- apt-get install -qy postgresql-client | |
#Install Crypt | |
- apt-get install -qy libmcrypt-dev | |
#Install Composer Platform Reqs | |
- docker-php-ext-install bcmath | |
#Copy .env.example to .env | |
- cp -f .env.pipeline .env | |
#Install Composer | |
- curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer | |
- composer install | |
#Migrate Database | |
- touch database/database.sqlite | |
- php artisan key:generate | |
- php artisan migrate | |
# - php artisan l5-swagger:generate | |
#Run phpcs | |
- ./vendor/bin/phpcs --standard=PSR12 --warning-severity=6 app/ routes/ tests/ | |
#Run Test Suite | |
- phpdbg -qrr vendor/bin/phpunit | |
# - php -dpcov.enabled=1 -dpcov.directory=. -dpcov.exclude="~vendor~" ./vendor/bin/phpunit | |
# - php coverage-checker.php clover.xml 65 | |
services: | |
#Add MySql Database | |
- postgres | |
# Additional Manual Step for Deployer if Needed. | |
# Otherwise move "artisan deploy..." to testing step so deployment is automatic. | |
definitions: | |
services: | |
postgres: | |
image: postgres | |
environment: | |
POSTGRES_DB: 'laravel' | |
POSTGRES_USER: sail | |
POSTGRES_PASSWORD: password |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment