-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
1,331 additions
and
1,300 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +0,0 @@ | ||
service_name: travis-ci | ||
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
export PATH=$PWD/laradockctl/bin:$PATH | ||
export LARADOCKCTL_COMMAND_PATH=$PWD/.laradock/commands:$PWD/laradockctl/src/commands | ||
if [[ -f .envrc.local ]]; then | ||
source_env .envrc.local | ||
fi | ||
|
||
# vim: set ft=bash: |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export PATH=$PWD/laradockctl/bin:$PATH | ||
export LARADOCKCTL_COMMAND_PATH=$PWD/.laradock/commands:$PWD/laradockctl/src/commands |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,154 @@ | ||
name: PHP CI | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
install_tools: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
name: Install tools | ||
|
||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install PHIVE | ||
uses: nick-invision/retry@v2 | ||
with: | ||
timeout_minutes: 10 | ||
max_attempts: 3 | ||
command: | | ||
wget -O phive.phar https://phar.io/releases/phive.phar | ||
wget -O phive.phar.asc https://phar.io/releases/phive.phar.asc | ||
gpg --keyserver pool.sks-keyservers.net --recv-keys 0x9D8A98B29B2D5D79 | ||
gpg --verify phive.phar.asc phive.phar | ||
- name: Install tools | ||
uses: nick-invision/retry@v2 | ||
with: | ||
timeout_minutes: 10 | ||
max_attempts: 3 | ||
command: | | ||
php phive.phar --no-progress install \ | ||
--copy \ | ||
--trust-gpg-keys E82B2FB314E9906E,31C7E470E2138192,CF1A108D0E7AE720,4AA394086372C20A | ||
- name: Upload tools to artifact store | ||
uses: actions/upload-artifact@master | ||
with: | ||
name: tools | ||
path: tools | ||
|
||
test: | ||
|
||
needs: install_tools | ||
|
||
runs-on: ubuntu-latest | ||
|
||
services: | ||
mysql: | ||
image: mysql | ||
ports: | ||
- 3306:3306 | ||
options: >- | ||
--health-cmd "mysqladmin ping -h 127.0.0.1" | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
env: | ||
MYSQL_ALLOW_EMPTY_PASSWORD: yes | ||
MYSQL_DATABASE: test | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php: ['7.3', '7.4', '8.0'] | ||
laravel: ['6', '7', '8'] | ||
deps: [highest, lowest] | ||
include: | ||
- php: '7.4' | ||
laravel: '8' | ||
deps: current | ||
|
||
name: Test (PHP ${{ matrix.php }}, Laravel ${{ matrix.laravel }}, ${{ matrix.deps }} dependencies) | ||
|
||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up PHP ${{ matrix.php }} | ||
run: sudo update-alternatives --set php /usr/bin/php${{ matrix.php }} | ||
|
||
- name: Update Composer to latest version | ||
run: composer self-update | ||
|
||
- name: Specify composer.json to use | ||
run: | | ||
if [[ "${{ matrix.laravel }}" == '6' ]]; then | ||
export COMPOSER=composer-ci-laravel6.json | ||
fi | ||
if [[ "${{ matrix.laravel }}" == '7' ]]; then | ||
export COMPOSER=composer-ci-laravel7.json | ||
fi | ||
if [[ "${{ matrix.laravel }}" == '8' ]]; then | ||
export COMPOSER=composer-ci-laravel8.json | ||
fi | ||
- name: Validate composer.json and composer.lock | ||
run: composer validate | ||
|
||
- name: Cache Composer packages | ||
if: matrix.deps == 'current' | ||
id: composer-cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: vendor | ||
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-php- | ||
- name: Install dependencies | ||
run: | | ||
if [[ "${{ matrix.deps }}" == 'current' && "${{ steps.composer-cache.outputs.cache-hit }}" != 'true' ]]; then | ||
composer install --no-interaction | ||
fi | ||
if [[ "${{ matrix.deps }}" == 'highest' ]]; then | ||
composer update --no-interaction | ||
fi | ||
if [[ "${{ matrix.deps }}" == 'lowest' ]]; then | ||
composer update --no-interaction --prefer-lowest --prefer-stable | ||
fi | ||
- name: Download tools from artifact store | ||
uses: actions/download-artifact@master | ||
with: | ||
name: tools | ||
path: tools | ||
|
||
- name: Change MySQL authentication method | ||
run: mysql -h 127.0.0.1 -u root -e "ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY ''" | ||
|
||
- name: Run lint | ||
run: composer lint | ||
|
||
- name: Run bug analysis | ||
run: composer findbugs | ||
|
||
- name: Run unit tests | ||
env: | ||
DB_HOST: '127.0.0.1' | ||
DB_DATABASE: 'test' | ||
DB_USERNAME: 'root' | ||
DB_PASSWORD: '' | ||
XDEBUG_MODE: coverage | ||
run: composer test | ||
|
||
- name: Upload coverage results to Coveralls | ||
env: | ||
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
uses: nick-invision/retry@v2 | ||
with: | ||
timeout_minutes: 10 | ||
max_attempts: 3 | ||
command: php tools/php-coveralls --coverage_clover=build/logs/clover.xml -v |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,12 @@ | ||
/.laradock/data/* | ||
!/.laradock/data/.gitkeep | ||
/build/ | ||
/tools/ | ||
/vendor/ | ||
.envrc.local | ||
.php_cs | ||
.php_cs.cache | ||
.phpunit.result.cache | ||
/build/ | ||
/vendor/ | ||
phpcs.xml | ||
phpstan.neon | ||
phpunit.xml |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash | ||
set -Ceuo pipefail | ||
|
||
local NAME='my:destroy' | ||
local DESCRIPTION='Destory my development environment' | ||
|
||
handle() { | ||
docker-compose down -v | ||
local YN | ||
read -p 'Do you want to remove data? (y/N)' YN | ||
if [[ "${YN}" == 'y' ]]; then | ||
sudo rm -rf ../.laradock/data/* | ||
fi | ||
} |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/bash | ||
set -Ceuo pipefail | ||
|
||
local NAME='my:phive' | ||
local DESCRIPTION='Execute a PHIVE command' | ||
|
||
handle() { | ||
docker-compose exec -u laradock workspace phive --home .laradock/data/phive "$@" | ||
} |
This file contains 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
This file contains 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
1 change: 1 addition & 0 deletions
1
.laradock/mysql/docker-entrypoint-initdb.d/create-test-database.sql
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
CREATE DATABASE test; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<phive xmlns="https://phar.io/phive"> | ||
<phar name="php-coveralls" version="^2.4.3" installed="2.4.3" location="./tools/php-coveralls" copy="false"/> | ||
<phar name="phpcs" version="^3.5.8" installed="3.5.8" location="./tools/phpcs" copy="false"/> | ||
<phar name="phpstan" version="^0.12.64" installed="0.12.64" location="./tools/phpstan" copy="false"/> | ||
<phar name="phpunit" version="^9.5.0" installed="9.5.0" location="./tools/phpunit" copy="false"/> | ||
</phive> |
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
{ | ||
"name": "ngmy/eloquent-serialized-lob", | ||
"description": "Eloquent Serialized LOB is a trait for Laravel Eloquent models that allows Serialized LOB pattern", | ||
"keywords": [ | ||
"laravel", | ||
"eloquent", | ||
"serialized lob", | ||
"semi-structured", | ||
"json", | ||
"xml" | ||
], | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "Yuta Nagamiya", | ||
"email": "y.nagamiya@gmail.com" | ||
} | ||
], | ||
"type": "library", | ||
"require": { | ||
"php": "^7.3|^8.0", | ||
"doctrine/annotations": "^1.11.1", | ||
"illuminate/support": "^6.0", | ||
"jms/serializer": "^3.11.0" | ||
}, | ||
"require-dev": { | ||
"barryvdh/laravel-ide-helper": "2.9.0", | ||
"nunomaduro/larastan": "0.6.11", | ||
"orchestra/testbench": "4.13.0" | ||
}, | ||
"extra": { | ||
"laravel": { | ||
"providers": [ | ||
"Ngmy\\EloquentSerializedLob\\EloquentSerializedLobServiceProvider" | ||
] | ||
} | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"Ngmy\\EloquentSerializedLob\\": "src" | ||
} | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"Ngmy\\EloquentSerializedLob\\Tests\\": "tests", | ||
"Ngmy\\EloquentSerializedLob\\Tests\\SampleProjects\\IssueDatabase\\": "tests/sample_projects/issue_database", | ||
"Ngmy\\EloquentSerializedLob\\Tests\\SampleProjects\\OrganizationHierarchy\\": "tests/sample_projects/organization_hierarchy" | ||
}, | ||
"classmap": [ | ||
"tests/database/migrations" | ||
] | ||
}, | ||
"config": { | ||
"sort-packages": true | ||
}, | ||
"minimum-stability": "dev", | ||
"prefer-stable": true, | ||
"scripts": { | ||
"test": [ | ||
"@php tools/phpunit --colors=always" | ||
], | ||
"lint": [ | ||
"@php tools/phpcs --colors" | ||
], | ||
"findbugs": [ | ||
"@php tools/phpstan analyse --ansi" | ||
] | ||
} | ||
} |
Oops, something went wrong.