Skip to content

Commit

Permalink
Merge branch 'dev' into dev-4
Browse files Browse the repository at this point in the history
  • Loading branch information
ryuring committed Apr 16, 2023
2 parents 8e7ec34 + 98bb70b commit 6e012d6
Show file tree
Hide file tree
Showing 6,063 changed files with 344,994 additions and 593,226 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
16 changes: 11 additions & 5 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,21 @@ trim_trailing_whitespace = true
[*.bat]
end_of_line = crlf

[*.yml]
indent_style = space
[*.scss]
indent_size = 2

[*.php]
indent_style = tab
[*.css]
indent_size = 2

[*.scss]
[*.yml]
indent_size = 2

[*.twig]
insert_final_newline = false

[*.{md,markdown}]
trim_trailing_whitespace = false

[plugins/*/templates/**.php]
indent_size = 2

46 changes: 46 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Define the line ending behavior of the different file extensions
# Set default behaviour, in case users don't have core.autocrlf set.
* text=auto
* text eol=lf

# Explicitly declare text files we want to always be normalized and converted
# to native line endings on checkout.
*.php text
*.default text
*.ctp text
*.sql text
*.md text
*.po text
*.js text
*.css text
*.ini text
*.properties text
*.txt text
*.xml text
*.svg text
*.yml text
.htaccess text

# Declare files that will always have CRLF line endings on checkout.
*.bat eol=crlf

# Declare files that will always have LF line endings on checkout.
*.pem eol=lf

# Denote all files that are truly binary and should not be modified.
*.png binary
*.jpg binary
*.gif binary
*.ico binary
*.mo binary
*.pdf binary
*.phar binary
*.woff binary
*.woff2 binary
*.ttf binary
*.otf binary
*.eot binary
*.gz binary
*.bz2 binary
*.7z binary
*.zip binary
File renamed without changes.
54 changes: 54 additions & 0 deletions .github/workflows/php_documentor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#
# php_documentor.yml
# PhpDocumentor で作成したページを GitHub Pages にデプロイする
#

name: PhpDocumentor

on:
push:
branches:
- 'master'

jobs:
test:
name: PhpDocumentor

runs-on: ubuntu-20.04

strategy:
matrix:
php-version: ['8.1']

steps:

- name: Checkout
uses: actions/checkout@v3

- name: Run compose
run: |
cd docker
cp docker-compose.yml.default docker-compose.yml
sed -i -e "s/basercms:php8.1/basercms:php${{ matrix.php-version }}/g" docker-compose.yml
sed -i -e "s/XDEBUG_MODE: \"debug\"/XDEBUG_MODE: \"off\"/g" docker-compose.yml
docker-compose up -d
- name: PhpDocumentor
run: |
cd docker
docker exec bc5-php wget https://phpdoc.org/phpDocumentor.phar
docker exec bc5-php php phpDocumentor.phar --title="baserCMS クラスリファレンス"
- name: Deploy to Github Pages
env:
TOKEN: ${{ secrets.TOKEN }}
run: |
git config --global user.name 'ryuring'
git config --global user.email 'ryuring55@github.com'
git clone https://ryuring:${TOKEN}@github.com/baserproject/baserproject.github.io.git
cd baserproject.github.io
cp -pr ../reference ./5/plugin/
git add -A
git commit -m "[actions] update baserCMS Class Method Reference" || echo "No changes to commit"
git push origin master
95 changes: 95 additions & 0 deletions .github/workflows/split_monorepo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
name: 'Packages Split'

on:
push:
branches:
- master
tags:
- '*'
jobs:
packages_split:
runs-on: ubuntu-latest
environment: develop
strategy:
fail-fast: false
matrix:
package:
-
local_path: 'baser-core'
split_repository: 'baser-core'
-
local_path: 'bc-admin-third'
split_repository: 'bc-admin-third'
-
local_path: 'bc-blog'
split_repository: 'bc-blog'
-
local_path: 'bc-column'
split_repository: 'bc-column'
-
local_path: 'bc-content-link'
split_repository: 'bc-content-link'
-
local_path: 'bc-custom-content'
split_repository: 'bc-custom-content'
-
local_path: 'bc-editor-template'
split_repository: 'bc-editor-template'
-
local_path: 'bc-favorite'
split_repository: 'bc-favorite'
-
local_path: 'bc-front'
split_repository: 'bc-front'
-
local_path: 'bc-installer'
split_repository: 'bc-installer'
-
local_path: 'bc-mail'
split_repository: 'bc-mail'
-
local_path: 'bc-search-index'
split_repository: 'bc-search-index'
-
local_path: 'bc-theme-config'
split_repository: 'bc-theme-config'
-
local_path: 'bc-theme-file'
split_repository: 'bc-theme-file'
-
local_path: 'bc-uploader'
split_repository: 'bc-uploader'
-
local_path: 'bc-widget-area'
split_repository: 'bc-widget-area'
steps:
- uses: actions/checkout@v3
# no tag
-
if: "!startsWith(github.ref, 'refs/tags/')"
name: Monorepo Split of ${{ matrix.package }}
uses: "symplify/monorepo-split-github-action@v2.3.0"
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}
with:
package_directory: 'plugins/${{ matrix.package.local_path }}'
repository_organization: 'baserproject'
repository_name: '${{ matrix.package.split_repository }}'
branch: "master"
user_name: "ryuring"
user_email: "ryuring55@gmail.com"
# with tag
-
if: "startsWith(github.ref, 'refs/tags/')"
name: Monorepo Tagged Split of ${{ matrix.package }}
uses: "symplify/monorepo-split-github-action@v2.3.0"
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}
with:
tag: ${GITHUB_REF#refs/tags/}
package_directory: 'plugins/${{ matrix.package.local_path }}'
repository_organization: 'baserproject'
repository_name: '${{ matrix.package.split_repository }}'
branch: "master"
user_name: "ryuring"
user_email: "ryuring55@gmail.com"
44 changes: 23 additions & 21 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
#
# test.yml
#
# コンテナ起動時に、composer install を実行するが、Github Actions では、非同期で処理が走るため
# composer の処理が完了する前にテストが行われてしまい、テストが失敗する。
# そのため、composer install を同期処理とするため、ジョブの steps に composer の処理を追加している
# ユニットテストの実行
# コンテナの初期化が完了する前にユニットテストを実行すると失敗してしまうので sleep で待つようにしている
# /docker/init.sh に記載している sleep の秒数プラス 10秒を目安として設定する
#

name: Test

on: [ push, pull_request ]
on:
push:
tags-ignore:
- '**'
branches:
- '**'
- '!master'
pull_request:

jobs:
test:
Expand All @@ -18,39 +24,35 @@ jobs:

strategy:
matrix:
php-version: ['7.4']
php-version: ['8.1']

steps:

- name: Setup PHP 7.4
uses: shivammathur/setup-php@v2
with:
php-version: 7.4

- name: Checkout
uses: actions/checkout@v2

- name: Validate composer.json and composer.lock
run: composer validate

- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-suggest
uses: actions/checkout@v3

- name: Run compose
run: |
cd docker
cp docker-compose.yml.default docker-compose.yml
sed -i -e "s/basercms:php8.1/basercms:php${{ matrix.php-version }}/g" docker-compose.yml
sed -i -e "s/XDEBUG_MODE: \"debug\"/XDEBUG_MODE: \"off\"/g" docker-compose.yml
docker-compose up -d
- name: Sleep for 20 seconds
run: sleep 20

- name: Compose log
run: |
run: |
cd docker
docker-compose logs
- name: Install
run: |
cd docker
docker exec bc5-php composer run-script install
- name: Run test suite
run: |
docker exec bc-php composer run-script install
docker exec bc-php composer run-script test
cd docker
docker exec bc5-php composer run-script test
Loading

0 comments on commit 6e012d6

Please sign in to comment.