add laravel8

This commit is contained in:
Romulus21
2021-08-06 10:10:03 +02:00
parent 9bd45bb5e8
commit fdd99dda83
5 changed files with 116 additions and 72 deletions

View File

@@ -1,72 +1,40 @@
# Official framework image. Look for the different tagged releases at: image: edbizarro/gitlab-ci-pipeline-php:7.4
# https://hub.docker.com/r/library/php
image: php:latest
# Pick zero or more services to be used on all builds. stages:
# Only needed when using a docker container to run your tests in. - preparation
# Check out: http://docs.gitlab.com/ee/ci/docker/using_docker_images.html#what-is-a-service - building
services: - syntax
- mysql:latest - testing
- deploy
variables: cache:
MYSQL_DATABASE: project_name key: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
MYSQL_ROOT_PASSWORD: secret
# This folder is cached between builds composer:
# http://docs.gitlab.com/ee/ci/yaml/README.html#cache stage: preparation
script:
- 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: cache:
paths: paths:
- vendor/ - vendor/
- node_modules/
# This is a basic example for a gem or script which doesn't use yarn:
# services such as redis or postgres stage: preparation
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:
script: script:
# run laravel tests - yarn install --pure-lockfile
- php vendor/bin/phpunit --coverage-text --colors=never artifacts:
# run frontend tests paths:
# if you have any task for testing frontend - node_modules/
# set it in your package.json script expire_in: 1 days
# comment this out if you don't have a frontend test when: always
- npm test cache:
paths:
- node_modules/

3
.idea/php.xml generated
View File

@@ -149,9 +149,10 @@
<path value="$PROJECT_DIR$/vendor/spatie/temporary-directory" /> <path value="$PROJECT_DIR$/vendor/spatie/temporary-directory" />
<path value="$PROJECT_DIR$/vendor/spatie/db-dumper" /> <path value="$PROJECT_DIR$/vendor/spatie/db-dumper" />
<path value="$PROJECT_DIR$/vendor/paragonie/constant_time_encoding" /> <path value="$PROJECT_DIR$/vendor/paragonie/constant_time_encoding" />
<path value="$PROJECT_DIR$/vendor/talvbansal/laravel-gitlab-ci-config-generator" />
</include_path> </include_path>
</component> </component>
<component name="PhpProjectSharedConfiguration" php_language_level="7.4" /> <component name="PhpProjectSharedConfiguration" php_language_level="8.0" />
<component name="PhpUnit"> <component name="PhpUnit">
<phpunit_settings> <phpunit_settings>
<PhpUnitSettings configuration_file_path="$PROJECT_DIR$/phpunit.xml" custom_loader_path="$PROJECT_DIR$/vendor/autoload.php" use_configuration_file="true" /> <PhpUnitSettings configuration_file_path="$PROJECT_DIR$/phpunit.xml" custom_loader_path="$PROJECT_DIR$/vendor/autoload.php" use_configuration_file="true" />

1
.idea/portal.iml generated
View File

@@ -148,6 +148,7 @@
<excludeFolder url="file://$MODULE_DIR$/vendor/spatie/temporary-directory" /> <excludeFolder url="file://$MODULE_DIR$/vendor/spatie/temporary-directory" />
<excludeFolder url="file://$MODULE_DIR$/vendor/spatie/db-dumper" /> <excludeFolder url="file://$MODULE_DIR$/vendor/spatie/db-dumper" />
<excludeFolder url="file://$MODULE_DIR$/vendor/paragonie/constant_time_encoding" /> <excludeFolder url="file://$MODULE_DIR$/vendor/paragonie/constant_time_encoding" />
<excludeFolder url="file://$MODULE_DIR$/vendor/talvbansal/laravel-gitlab-ci-config-generator" />
</content> </content>
<orderEntry type="inheritedJdk" /> <orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="sourceFolder" forTests="false" />

View File

@@ -8,7 +8,7 @@
], ],
"license": "MIT", "license": "MIT",
"require": { "require": {
"php": "^7.4.0", "php": "^8.0",
"fideloper/proxy": "^4.2", "fideloper/proxy": "^4.2",
"fruitcake/laravel-cors": "^1.0", "fruitcake/laravel-cors": "^1.0",
"guzzlehttp/guzzle": "^7.0.1", "guzzlehttp/guzzle": "^7.0.1",
@@ -32,7 +32,8 @@
"mockery/mockery": "^1.3.1", "mockery/mockery": "^1.3.1",
"nunomaduro/collision": "^5.0", "nunomaduro/collision": "^5.0",
"phpunit/phpunit": "^8.5", "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": { "config": {
"optimize-autoloader": true, "optimize-autoloader": true,

77
composer.lock generated
View File

@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "af7dafa431cbba9912319b9eb48e2700", "content-hash": "672c33dd764b0e46196962741ac67b7c",
"packages": [ "packages": [
{ {
"name": "asm89/stack-cors", "name": "asm89/stack-cors",
@@ -9838,6 +9838,77 @@
], ],
"time": "2021-01-28T16:54:48+00:00" "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", "name": "theseer/tokenizer",
"version": "1.2.0", "version": "1.2.0",
@@ -9891,7 +9962,9 @@
], ],
"aliases": [], "aliases": [],
"minimum-stability": "dev", "minimum-stability": "dev",
"stability-flags": [], "stability-flags": {
"talvbansal/laravel-gitlab-ci-config-generator": 20
},
"prefer-stable": true, "prefer-stable": true,
"prefer-lowest": false, "prefer-lowest": false,
"platform": { "platform": {