From fdd99dda833685fe5c2de5de46a11e6831be1d75 Mon Sep 17 00:00:00 2001 From: Romulus21 Date: Fri, 6 Aug 2021 10:10:03 +0200 Subject: [PATCH] add laravel8 --- .gitlab-ci.yml | 102 ++++++++++++++++------------------------------- .idea/php.xml | 3 +- .idea/portal.iml | 1 + composer.json | 5 ++- composer.lock | 77 ++++++++++++++++++++++++++++++++++- 5 files changed, 116 insertions(+), 72 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5d2c802..a530229 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,72 +1,40 @@ -# Official framework image. Look for the different tagged releases at: -# https://hub.docker.com/r/library/php -image: php:latest +image: edbizarro/gitlab-ci-pipeline-php:7.4 -# Pick zero or more services to be used on all builds. -# Only needed when using a docker container to run your tests in. -# Check out: http://docs.gitlab.com/ee/ci/docker/using_docker_images.html#what-is-a-service -services: - - mysql:latest +stages: + - preparation + - building + - syntax + - testing + - deploy -variables: - MYSQL_DATABASE: project_name - MYSQL_ROOT_PASSWORD: secret - -# This folder is cached between builds -# http://docs.gitlab.com/ee/ci/yaml/README.html#cache cache: - paths: - - vendor/ - - node_modules/ + key: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG" -# This is a basic example for a gem or script which doesn't use -# services such as redis or postgres -before_script: - # Update packages - - apt-get update -yqq - # Prep for Node - - apt-get install gnupg -yqq - # Upgrade to Node 8 - - curl -sL https://deb.nodesource.com/setup_8.x | bash - - # Install dependencies - - apt-get install git nodejs 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 - # Install php extensions - - docker-php-ext-install mbstring pdo_mysql curl json intl gd xml zip bz2 opcache - # Install & enable Xdebug for code coverage reports - - pecl install xdebug - - docker-php-ext-enable xdebug - # Install Composer and project dependencies. - - curl -sS https://getcomposer.org/installer | php - - php composer.phar install - # Install Node dependencies. - # comment this out if you don't have a node dependency - - npm install - # Copy over testing configuration. - # Don't forget to set the database config in .env.testing correctly - # DB_HOST=mysql - # DB_DATABASE=project_name - # DB_USERNAME=root - # DB_PASSWORD=secret - - cp .env.testing .env - # Run npm build - # comment this out if you don't have a frontend build - # you can change this to to your frontend building script like - # npm run build - - npm run dev - # Generate an application key. Re-cache. - - php artisan key:generate - - php artisan config:cache - # Run database migrations. - - php artisan migrate - # Run database seed - - php artisan db:seed - -test: +composer: + stage: preparation script: - # run laravel tests - - php vendor/bin/phpunit --coverage-text --colors=never - # run frontend tests - # if you have any task for testing frontend - # set it in your package.json script - # comment this out if you don't have a frontend test - - npm test + - composer install --prefer-dist --no-ansi --no-interaction --no-progress --no-scripts --no-suggest + - cp .env.example .env + - php artisan key:generate + artifacts: + paths: + - vendor/ + - .env + expire_in: 1 days + when: always + cache: + paths: + - vendor/ + +yarn: + stage: preparation + script: + - yarn install --pure-lockfile + artifacts: + paths: + - node_modules/ + expire_in: 1 days + when: always + cache: + paths: + - node_modules/ diff --git a/.idea/php.xml b/.idea/php.xml index f8131fc..9d173ed 100644 --- a/.idea/php.xml +++ b/.idea/php.xml @@ -149,9 +149,10 @@ + - + diff --git a/.idea/portal.iml b/.idea/portal.iml index f5e2b0f..a1ba8ee 100644 --- a/.idea/portal.iml +++ b/.idea/portal.iml @@ -148,6 +148,7 @@ + diff --git a/composer.json b/composer.json index 27464a6..30bc9a6 100644 --- a/composer.json +++ b/composer.json @@ -8,7 +8,7 @@ ], "license": "MIT", "require": { - "php": "^7.4.0", + "php": "^8.0", "fideloper/proxy": "^4.2", "fruitcake/laravel-cors": "^1.0", "guzzlehttp/guzzle": "^7.0.1", @@ -32,7 +32,8 @@ "mockery/mockery": "^1.3.1", "nunomaduro/collision": "^5.0", "phpunit/phpunit": "^8.5", - "spatie/laravel-web-tinker": "^1.7" + "spatie/laravel-web-tinker": "^1.7", + "talvbansal/laravel-gitlab-ci-config-generator": "dev-master" }, "config": { "optimize-autoloader": true, diff --git a/composer.lock b/composer.lock index ee47a8d..d0a3201 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "af7dafa431cbba9912319b9eb48e2700", + "content-hash": "672c33dd764b0e46196962741ac67b7c", "packages": [ { "name": "asm89/stack-cors", @@ -9838,6 +9838,77 @@ ], "time": "2021-01-28T16:54:48+00:00" }, + { + "name": "talvbansal/laravel-gitlab-ci-config-generator", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/talvbansal/laravel-gitlab-ci-config-generator.git", + "reference": "7c88268fc6836f50ec0115c74bcf1b56832e0e2b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/talvbansal/laravel-gitlab-ci-config-generator/zipball/7c88268fc6836f50ec0115c74bcf1b56832e0e2b", + "reference": "7c88268fc6836f50ec0115c74bcf1b56832e0e2b", + "shasum": "" + }, + "require": { + "php": "^8.0|^7.2" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^2.16", + "orchestra/testbench": "^5.0", + "phpunit/phpunit": "^9.0", + "symfony/var-dumper": "^5.0" + }, + "default-branch": true, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Talvbansal\\GitlabCiConfigGenerator\\GitlabCiConfigGeneratorServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Talvbansal\\GitlabCiConfigGenerator\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Talv Bansal", + "email": "talvbansal@outlook.com", + "homepage": "https://talvbansal.me", + "role": "Developer" + } + ], + "description": "A Gitlab CI Config Generator and Dependency Installer", + "homepage": "https://github.com/talvbansal/laravel-gitlab-ci-config-generator", + "keywords": [ + "laravel-gitlab-ci-config-generator", + "talvbansal" + ], + "support": { + "issues": "https://github.com/talvbansal/laravel-gitlab-ci-config-generator/issues", + "source": "https://github.com/talvbansal/laravel-gitlab-ci-config-generator/tree/master" + }, + "funding": [ + { + "url": "https://paypal.me/talvbansal", + "type": "custom" + }, + { + "url": "https://github.com/talvbansal", + "type": "github" + } + ], + "time": "2021-05-15T22:49:14+00:00" + }, { "name": "theseer/tokenizer", "version": "1.2.0", @@ -9891,7 +9962,9 @@ ], "aliases": [], "minimum-stability": "dev", - "stability-flags": [], + "stability-flags": { + "talvbansal/laravel-gitlab-ci-config-generator": 20 + }, "prefer-stable": true, "prefer-lowest": false, "platform": {