-
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.
Merge pull request #3 from webstream-framework/feature/#1_infrastructure
各種環境更新
- Loading branch information
Showing
14 changed files
with
131 additions
and
50 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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: build | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: nanasess/setup-php@master | ||
with: | ||
php-version: '7.4' | ||
- name: Cache Composer packages | ||
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 | ||
if: steps.composer-cache.outputs.cache-hit != 'true' | ||
run: composer install --prefer-dist --no-progress --no-suggest | ||
- name: Run test suite and calculate coverage | ||
run: phpdbg -qrr vendor/bin/phpunit --configuration phpunit.xml --coverage-clover=coverage.clover | ||
- name: Prepare send coverage | ||
run: wget https://scrutinizer-ci.com/ocular.phar | ||
- name: Send coverage report to scrutinizer | ||
run: php ocular.phar code-coverage:upload --format=php-clover coverage.clover |
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
<?php | ||
|
||
namespace WebStream\Container; | ||
|
||
use WebStream\Exception\Extend\InvalidArgumentException; | ||
|
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,13 @@ | ||
FROM php:7.4-cli | ||
LABEL maintainer Ryuichi Tanaka <mapserver2007@gmail.com> | ||
|
||
RUN apt-get update && apt-get install -y \ | ||
git | ||
|
||
RUN pecl install xdebug-2.9.6 && \ | ||
docker-php-ext-enable xdebug | ||
|
||
RUN rm -rf /var/lib/apt/lists/* && rm -rf /tmp/pear && rm -rf /tmp/* && \ | ||
apt-get clean -y && apt-get autoclean -y | ||
|
||
WORKDIR /workspace |
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,38 @@ | ||
require 'yaml' | ||
|
||
def force_sh(cmd) | ||
begin | ||
sh cmd | ||
rescue => e | ||
puts e.message | ||
end | ||
end | ||
|
||
task :default => :create_dev | ||
|
||
task :create_dev => [:create_network, :prune] do | ||
cmd = <<-EOS | ||
docker-compose build | ||
docker-compose down | ||
docker-compose up -d | ||
EOS | ||
sh cmd | ||
end | ||
|
||
task :create_dev_debug do | ||
cmd = <<-EOS | ||
docker-compose build | ||
docker-compose down | ||
docker-compose up | ||
EOS | ||
sh cmd | ||
end | ||
|
||
task :prune do | ||
force_sh 'docker volume prune -f > /dev/null 2>&1' | ||
force_sh 'docker rmi -f $(docker images -f "dangling=true" -q) > /dev/null 2>&1' | ||
end | ||
|
||
task :create_network do | ||
force_sh 'docker network create --driver bridge webstream_framework' | ||
end |
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
<?php | ||
|
||
namespace WebStream\Exception\Extend; | ||
|
||
/** | ||
|
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
<?php | ||
|
||
namespace WebStream\Container; | ||
|
||
/** | ||
|
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,5 +1,5 @@ | ||
{ | ||
"require": { | ||
"phpunit/phpunit": "6.*" | ||
"phpunit/phpunit": "9.*" | ||
} | ||
} |
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,15 @@ | ||
version: '3' | ||
services: | ||
webstream-framework-container: | ||
build: ./ | ||
image: webstream-framework/container | ||
container_name: webstream-framework-container | ||
volumes: | ||
- ./:/workspace | ||
working_dir: /workspace | ||
tty: true | ||
networks: | ||
- webstream_framework | ||
networks: | ||
webstream_framework: | ||
external: true |
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,8 @@ | ||
<?xml version="1.0"?> | ||
<ruleset> | ||
<file>./</file> | ||
<exclude-pattern>./vendor/*</exclude-pattern> | ||
<exclude-pattern>./Test/*</exclude-pattern> | ||
<rule ref="PSR12" /> | ||
<ini name="memory_limit" value="128M"/> | ||
</ruleset> |
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