Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
171 commits
Select commit Hold shift + click to select a range
706dfd8
Merge pull request #1 from KenTanaka/main
chihiro-adachi Dec 7, 2022
0679956
Merge pull request #2 from KenTanaka/develop/refactor1206
chihiro-adachi Jan 12, 2023
55b37c1
Merge pull request #1 from KenTanaka/main
sai-gillingham Mar 8, 2023
68effb7
デバイス認証済み電話番号をnullにしたら、ECCUBEシステムがバグする。
sai-gillingham Mar 8, 2023
680ae20
https://github.com/EC-CUBE/TwoFactorAuthCustomer42/issues/5
sai-gillingham Mar 8, 2023
43fd558
ゲスト登録不具合の修正。
sai-gillingham Mar 8, 2023
dc53ead
本人認証が無効設定でも実行されるの修正
sai-gillingham Mar 8, 2023
e247d14
本人認証が無効設定でも実行されるの修正
sai-gillingham Mar 8, 2023
652da9a
Merge remote-tracking branch 'origin/main'
sai-gillingham Mar 9, 2023
c942b7a
会員編集画面の2段階認証方式項目に未設定オプションを追加する。
sai-gillingham Mar 9, 2023
3bde284
仮会員設定:無効
sai-gillingham Mar 9, 2023
c93099b
購入フローで二段階認証をスキップさせないように修正。
sai-gillingham Mar 9, 2023
d12e1d4
APP認証プラグインを無効化した状態で、二段階認証にAPPが表示されないように修正
sai-gillingham Mar 9, 2023
154771d
無効になっているTwoFactorAuthTypeの行を消すことより無効になっているTwoFactorAuthType行を無効に設定する
sai-gillingham Mar 9, 2023
c2ec8c8
マイページ配下のページを重要操作ルーティングに指定しても、再認証されていない不具合を修正
kentanakayrglm Mar 10, 2023
997ad73
2段階認証選択画面の選択肢修正。
sai-gillingham Mar 10, 2023
4ba89a5
Merge remote-tracking branch 'origin/main'
sai-gillingham Mar 10, 2023
203a6cc
2段階認証を利用する項目は不要になったため、two_factor_auth項目を消す。
sai-gillingham Mar 10, 2023
53c3832
2段階認証を利用する項目は不要になったため、two_factor_auth項目を消す。
sai-gillingham Mar 10, 2023
220ae00
ワンタイムパスワードの値をハッシュ化にする。+ SMSの電話番号チェックの修正
sai-gillingham Mar 10, 2023
2533067
ログアウトするときに、二段階認証クッキーが消えるようになった。
sai-gillingham Mar 10, 2023
ef8d2e3
デフォルト操作ルートのみで2段階認証クッキーデータをデータベースに保存する
sai-gillingham Mar 11, 2023
48ac6b9
ハッシュしているため、device_auth_one_time_token文字列のlengthを10桁から255桁に変更する。
sai-gillingham Mar 13, 2023
4444322
e2e テスト。
sai-gillingham Mar 14, 2023
dcab825
e2e テスト。
sai-gillingham Mar 14, 2023
b9a3079
e2e テスト。
sai-gillingham Mar 14, 2023
f890bc4
一旦、手動のみで実行する。
sai-gillingham Mar 14, 2023
56f1d37
一旦、手動のみで実行する。
sai-gillingham Mar 14, 2023
accbb8e
add env=dev.
sai-gillingham Mar 14, 2023
ca3a02f
env fix.
sai-gillingham Mar 14, 2023
1c51772
AB base test file.
sai-gillingham Mar 14, 2023
e44244e
E2E Include all plugins.
sai-gillingham Mar 14, 2023
10e0e31
AB TEST.
sai-gillingham Mar 14, 2023
1984de9
AB TEST.
sai-gillingham Mar 14, 2023
1f2fd4b
AB TEST.
sai-gillingham Mar 14, 2023
b36f864
mounted mode.
sai-gillingham Mar 14, 2023
510788e
repository name fix.
sai-gillingham Mar 14, 2023
197649a
clean all files.
sai-gillingham Mar 14, 2023
57fbd5a
DEBUG.
sai-gillingham Mar 14, 2023
6f3f922
MYSQL debug.
sai-gillingham Mar 14, 2023
2f061b8
DOCKER ISSUE?
sai-gillingham Mar 14, 2023
09c1884
MYSQL load issue.
sai-gillingham Mar 14, 2023
ddb2bc6
MYSQL load issue.
sai-gillingham Mar 14, 2023
6db631e
FIXUP WORDING.
sai-gillingham Mar 15, 2023
e89d5a7
Permissions issue?
sai-gillingham Mar 15, 2023
ee048a4
除外ルーティング項目を消す。
sai-gillingham Mar 15, 2023
3b05b58
composer.json更新
chihiro-adachi Mar 15, 2023
b17e49f
デフォルト操作ルート
sai-gillingham Mar 15, 2023
467e5a8
gitflowの順番変更。
sai-gillingham Mar 15, 2023
9b94926
gitflowの順番変更。
sai-gillingham Mar 15, 2023
60683c0
PluginManagerから除外ルーティング設定処理を消す
sai-gillingham Mar 15, 2023
e3e9277
本人認証と二要素認証クラスの別け
sai-gillingham Mar 15, 2023
9f3b653
\Twig_Environmentを\Twig\Environmentに変更。
sai-gillingham Mar 15, 2023
2cb0154
性能試験:実行順番変更
sai-gillingham Mar 15, 2023
5162929
性能試験:実行順番変更
sai-gillingham Mar 15, 2023
2d26c37
TokenStorageInterfaceは不要のため、消す
sai-gillingham Mar 15, 2023
85a1bf5
フォーム項目の値の抽出をisValid|isSubmittedの範囲内に移動する。
sai-gillingham Mar 15, 2023
431b121
性能試験:フアイル権限の変更
sai-gillingham Mar 15, 2023
e0a455f
findBy -> findOneByに移動
sai-gillingham Mar 15, 2023
2595de3
不要変数を消す
sai-gillingham Mar 15, 2023
7b4bd73
RedirectResponseを$this->redirectToRouteに変更する。
sai-gillingham Mar 15, 2023
fa2c288
性能試験:sudoで過去のフアイルを消す
sai-gillingham Mar 15, 2023
45ce1ee
Merge pull request #21 from EC-CUBE/fix-composer-json
chihiro-adachi Mar 15, 2023
3ded762
composer json の更新
sai-gillingham Mar 15, 2023
3751f20
リポジトリクエリーをfindOneBY関数に変更
sai-gillingham Mar 15, 2023
2e4d417
array_sliceの不具合
sai-gillingham Mar 15, 2023
345ac56
plg_two_factor_auth_type.name列をNULLからNOT NULLに変更する。
sai-gillingham Mar 15, 2023
6018c03
他の会員でも同じ番号によって認証済みになってないかの確認コードの追加。
sai-gillingham Mar 15, 2023
6a7f1a3
不要変数を消す
sai-gillingham Mar 15, 2023
e077282
字の誤りの修正
sai-gillingham Mar 15, 2023
c9e6e8d
不要定数を消す。
sai-gillingham Mar 15, 2023
eaf349f
本人認証:トークン入力時の電話番号確認処理 考慮漏れを修正
kentanakayrglm Mar 15, 2023
d81e346
表記ゆれ修正
kentanakayrglm Mar 15, 2023
6af3899
概要資料更新
kentanakayrglm Mar 15, 2023
5931bb6
本人認証エンドポイントのチェック修正(認証済みか?→ログイン済みか?)
kentanakayrglm Mar 15, 2023
a6f2b8b
本人認証完了時、認証トークンをクリアする
kentanakayrglm Mar 15, 2023
ffcbbd4
不要コメント削除
kentanakayrglm Mar 15, 2023
64b80b9
フィールド属性を修正
kentanakayrglm Mar 15, 2023
a75a346
Merge pull request #22 from sai-gillingham/main
chihiro-adachi Mar 15, 2023
9c56ef1
fix cs
chihiro-adachi Mar 15, 2023
aa2d9c6
・composer - version修正
kentanakayrglm Mar 16, 2023
4897a4b
マージ漏れ修正
kentanakayrglm Mar 16, 2023
755bf00
ページデータが消えない問題の修正
sai-gillingham Mar 16, 2023
39df56d
PluginManagerの分岐条件の更新
sai-gillingham Mar 16, 2023
048d4cc
ページデータが消えない問題の修正
sai-gillingham Mar 16, 2023
67c4d49
PluginManagerの分岐条件の更新
sai-gillingham Mar 16, 2023
e62ad7b
Merge remote-tracking branch 'origin/main'
sai-gillingham Mar 16, 2023
81d7c06
secret_keyのバリデーションを追加
chihiro-adachi Mar 16, 2023
bdfcba3
$Customerのnullチェックを追加
chihiro-adachi Mar 16, 2023
ae78556
未使用の関数を削除
chihiro-adachi Mar 16, 2023
f1f11c3
厳密にnullチェック
chihiro-adachi Mar 16, 2023
52d0548
コメント微調整
chihiro-adachi Mar 16, 2023
5ee6186
Merge pull request #23 from EC-CUBE/fix-cs
KenTanaka Mar 17, 2023
9b6b289
Merge pull request #26 from EC-CUBE/fix-review
KenTanaka Mar 17, 2023
336e47d
バージョン修正
kentanakayrglm Mar 17, 2023
6483134
競合の修正
sai-gillingham Mar 17, 2023
91f26c7
Merge pull request #28 from sai-gillingham/main
KenTanaka Mar 17, 2023
c54f34d
CS FIXER + PhpStormクリーンアップ機能
sai-gillingham Mar 17, 2023
dcaf62f
不要変数を消す
sai-gillingham Mar 17, 2023
c42f38c
不要変数を消す
sai-gillingham Mar 17, 2023
3a251d8
不要変数を消す+CS FIXER
sai-gillingham Mar 17, 2023
03d031f
変数回復
sai-gillingham Mar 17, 2023
9e32822
Twigファイルのコメントの修正
sai-gillingham Mar 17, 2023
efa5ce4
Private/public順番の修正
sai-gillingham Mar 17, 2023
f17d712
$createdAt|$updatedAtアクセス修飾子の修正
sai-gillingham Mar 17, 2023
e97f7fd
sendBySmsメソッドの不要な引数を削除
kurozumi Mar 20, 2023
f15640a
ログアウト時、ログアウト会員の二段階認証クッキーレコードを削除する処理を追加 https://github.com/EC-CUBE/Two…
kentanakayrglm Mar 20, 2023
5ff61c8
コードの整理
sai-gillingham Mar 22, 2023
26ed4b1
改行の追加
sai-gillingham Mar 22, 2023
e80dcca
Merge pull request #29 from sai-gillingham/main
KenTanaka Mar 22, 2023
9f9fc89
fix:項目名の変更
dotani1111 Mar 22, 2023
b340d61
Merge pull request #34 from dotani1111/features/fix_two_factor_auth_name
chihiro-adachi Mar 22, 2023
51331df
Merge branch 'main' into kurozumi-patch-1
chihiro-adachi Mar 22, 2023
2e01e14
Merge pull request #31 from kurozumi/kurozumi-patch-1
chihiro-adachi Mar 22, 2023
bd07912
マイページ配下に変更
chihiro-adachi Mar 23, 2023
375c0cd
ツールチップを表示するように修正
chihiro-adachi Mar 23, 2023
5cfefb1
二段階認証のプラグイン(APPorSMS)がない状態であれば、二段階認証項目の非表示状態になる
sai-gillingham Mar 23, 2023
bd4e397
デバッグ用のdisabled属性を消す
sai-gillingham Mar 23, 2023
d323f61
Merge pull request #3 from sai-gillingham/review/pg-review
sai-gillingham Mar 23, 2023
7e9dc67
Merge pull request #37 from EC-CUBE/fix-tooltip
KenTanaka Mar 23, 2023
a0015a8
APIトークン項目のマスキング
sai-gillingham Mar 23, 2023
bb10769
不要変数を消す
sai-gillingham Mar 23, 2023
8cdcc5c
APIトークン項目のマスキング
sai-gillingham Mar 23, 2023
0d6bbb7
ワンタイムパスワード・マジックナンバーの生成処理のコード整理
sai-gillingham Mar 23, 2023
5fe2721
ワンタイムパスワードの桁数を環境変数から定数に移動する。
sai-gillingham Mar 23, 2023
fbf287b
Merge pull request #38 from sai-gillingham/hotfix/hide_2_auth_option_…
dotani1111 Mar 23, 2023
98023c3
Merge pull request #39 from sai-gillingham/feature/hide_api_token_v2
dotani1111 Mar 23, 2023
3e8d8c7
設計書をdoc配下へ移動
chihiro-adachi Mar 23, 2023
dd1a30a
リリース用のactionsを追加
chihiro-adachi Mar 23, 2023
f574c25
v2に更新
chihiro-adachi Mar 23, 2023
78908d4
Merge branch 'EC-CUBE:main' into main
sai-gillingham Mar 23, 2023
570c769
Merge pull request #40 from chihiro-adachi/add-release-action
KenTanaka Mar 23, 2023
a4d2cf9
Merge pull request #36 from EC-CUBE/fix-routing
KenTanaka Mar 23, 2023
14ac70c
Merge branch 'EC-CUBE:main' into main
sai-gillingham Mar 23, 2023
9e48ad2
Merge pull request #41 from sai-gillingham/feature/organize_one_time_…
KenTanaka Mar 23, 2023
ac7ce95
Merge branch 'EC-CUBE:main' into main
sai-gillingham Mar 23, 2023
23ca63d
findOneByではなくcountを利用するように修正しました。
sai-gillingham Mar 24, 2023
129c070
ワンタイムパスワードの桁数を定数から環境変数に移動する。
sai-gillingham Mar 24, 2023
244604c
ゲッター・セッター関数名のリファクタリング
sai-gillingham Mar 24, 2023
8c66233
スロットリングパラメータはルーティング名と合わせました。
sai-gillingham Mar 24, 2023
5c01b7e
スロットリング機能をトークン入力画面に追加する
sai-gillingham Mar 28, 2023
9120c58
二度とお客様が2段階認証方式設定を変更できなくなりました。
sai-gillingham Mar 28, 2023
22c8fb3
プラグイン設定:APIトークンのマスク処理見直し
sai-gillingham Mar 28, 2023
8131c01
コメントの書き直す
sai-gillingham Mar 28, 2023
6e8fb60
emailによる個別スロットリングを実装する
sai-gillingham Mar 28, 2023
8821814
認証方法選択画面レイアウトの調整
kentanakayrglm Mar 29, 2023
075d7db
SMSトークンの長さのオーバーライドパラメータとSMS有効期限のオーバーライドパラメータを消す
sai-gillingham Mar 29, 2023
a5f0e26
Merge pull request #42 from sai-gillingham/feature/review_fixes_2023_…
kiy0taka Mar 29, 2023
87a3df2
Merge branch 'main' into feature/add_throttling_routes
chihiro-adachi Mar 29, 2023
e82e673
Merge pull request #47 from sai-gillingham/feature/prevent_2_auth_reset
chihiro-adachi Mar 29, 2023
216092c
Merge pull request #46 from sai-gillingham/feature/add_throttling_routes
chihiro-adachi Mar 29, 2023
2fa9050
Merge pull request #50 from sai-gillingham/feature/email_throttling_i…
chihiro-adachi Mar 29, 2023
5172778
バリデーションを元にもどす
chihiro-adachi Mar 29, 2023
b5d66e9
Merge pull request #49 from sai-gillingham/feature/improved_api_token…
chihiro-adachi Mar 29, 2023
fa8910b
FormTypeのバリデーションと重複するため削除
chihiro-adachi Mar 29, 2023
8b04cf7
マスク値と異なる場合にバリデーションするように修正
chihiro-adachi Mar 29, 2023
e97f65c
Merge pull request #52 from sai-gillingham/feature/regulate_ui
chihiro-adachi Mar 29, 2023
5b6eb0f
Merge pull request #53 from chihiro-adachi/fix-secret-validation
KenTanaka Mar 29, 2023
2ec190a
Update plugin version to ec-cube 4.3
luoweiwang Mar 1, 2024
9e4ee2a
Update plugin version to ec-cube 4.3
luoweiwang Mar 6, 2024
b44edf5
管理画面ログアウトできないのを修正
tatsuishi Mar 14, 2024
897bb62
initial file main.yaml
luoweiwang Mar 15, 2024
8eed751
initial file main.yaml
luoweiwang Mar 15, 2024
5e9df9a
Merge pull request #56 from U-Mebius/dev/fix-admin-logout
chihiro-adachi Mar 18, 2024
140feb1
Update plugin version to ec-cube 4.3
luoweiwang Mar 18, 2024
e75b960
デバイス認証のトークン検証処理を修正
chihiro-adachi Mar 19, 2024
5bcf263
依存解決のため、eccube:composer:requireでインストールするように修正
chihiro-adachi Mar 19, 2024
903938b
Merge pull request #55 from luoweiwang/migration-4.3
chihiro-adachi Mar 19, 2024
58956a6
バージョンで分岐
chihiro-adachi Mar 19, 2024
215efad
4.3でトークン検証が通らなかったので修正
chihiro-adachi Mar 26, 2024
995e370
Merge pull request #57 from chihiro-adachi/fix-4.3
chihiro-adachi Apr 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
947 changes: 947 additions & 0 deletions .github/workflows/ab-testing.yml

Large diffs are not rendered by default.

180 changes: 180 additions & 0 deletions .github/workflows/e2e-testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@
name: E2E test for EC-CUBE
on:
workflow_dispatch:

jobs:
codeception:
name: Codeception
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
php: [ 8.0 ]
db: [ pgsql ]
group: [ 'admin01', 'admin02', 'admin03', 'front', 'restrict-fileupload', 'installer' ]
include:
- db: pgsql
database_url: postgres://postgres:password@127.0.0.1:5432/eccube_db
database_server_version: 14
- group: 'admin01'
app_env: 'codeception'
- group: 'admin02'
app_env: 'codeception'
- group: 'admin03'
app_env: 'codeception'
- group: 'front'
app_env: 'codeception'
- group: 'restrict-fileupload'
app_env: 'codeception'
- group: 'installer'
app_env: 'install'
services:
postgres:
image: postgres:14
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
ports:
- 5432:5432
# needed because the postgres container does not provide a healthcheck
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5

mailcatcher:
image: schickling/mailcatcher
ports:
- 1080:1080
- 1025:1025

steps:
- name: Checkout 4.2 Branch (POSTGRES)
uses: actions/checkout@master
with:
repository: ${{ github.repository_owner }}/ec-cube
ref: "4.2"

- name: Setup PHP
uses: nanasess/setup-php@master
with:
php-version: ${{ matrix.php }}

- name: Initialize Composer
uses: ./.github/actions/composer

- name: Setup to EC-CUBE
env:
APP_ENV: ${{ matrix.app_env }}
DATABASE_URL: ${{ matrix.database_url }}
DATABASE_SERVER_VERSION: ${{ matrix.database_server_version }}
run: |
echo "APP_ENV=${APP_ENV}" > .env
echo "TRUSTED_HOSTS=127.0.0.1,localhost" >> .env
bin/console doctrine:database:create --env=dev
bin/console doctrine:schema:create --env=dev
bin/console eccube:fixtures:load --env=dev
- name: Download Plugin TwoFactorAuthCustomer42
uses: actions/checkout@master
with:
path: app/Plugin/TwoFactorAuthCustomer42
- name: Download Plugin TwoFactorAuthCustomerApp42
uses: actions/checkout@master
with:
repository: ${{ github.repository_owner }}/TwoFactorAuthCustomerApp42
path: app/Plugin/TwoFactorAuthCustomerApp42
- name: Download Plugin TwoFactorAuthCustomerSms42
uses: actions/checkout@master
with:
repository: ${{ github.repository_owner }}/TwoFactorAuthCustomerSms42
path: app/Plugin/TwoFactorAuthCustomerSms42
- name: Install Plugins
env:
APP_ENV: ${{ matrix.app_env }}
DATABASE_URL: ${{ matrix.database_url }}
DATABASE_SERVER_VERSION: ${{ matrix.database_server_version }}
run: |
bin/console eccube:plugin:install --code=TwoFactorAuthCustomer42
bin/console cache:clear
bin/console eccube:plugin:enable --code=TwoFactorAuthCustomer42
bin/console cache:clear

bin/console eccube:plugin:install --code=TwoFactorAuthCustomerApp42
bin/console cache:clear
bin/console eccube:plugin:enable --code=TwoFactorAuthCustomerApp42
bin/console cache:clear

bin/console eccube:plugin:install --code=TwoFactorAuthCustomerSms42
bin/console cache:clear
bin/console eccube:plugin:enable --code=TwoFactorAuthCustomerSms42

- name: setup-chromedriver
uses: nanasess/setup-chromedriver@master

- name: Run chromedriver
run: |
export DISPLAY=:99
chromedriver --url-base=/wd/hub &
echo ">>> Started chrome-driver"
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 &
echo ">>> Started xvfb"
- name: Run package-api
run: |
if [[ ! -d ${PWD}/repos ]]; then mkdir -p ${PWD}/repos ; fi
docker run -d --rm -v ${PWD}/repos:/repos -e MOCK_REPO_DIR=/repos -p 8080:8080 eccube/mock-package-api:composer2
cp codeception/_data/plugins/*-1.0.0.tgz repos
- name: Start PHP Development Server
if: ${{ matrix.group != 'restrict-fileupload' }}
env:
APP_ENV: 'codeception'
DATABASE_URL: ${{ matrix.database_url }}
DATABASE_SERVER_VERSION: ${{ matrix.database_server_version }}
MAILER_DSN: 'smtp://127.0.0.1:1025'
ECCUBE_PACKAGE_API_URL: 'http://127.0.0.1:8080'
run: php -S 127.0.0.1:8000 codeception/router.php &

- name: Start PHP Development Server
if: ${{ matrix.group == 'restrict-fileupload' }}
env:
APP_ENV: 'codeception'
DATABASE_URL: ${{ matrix.database_url }}
DATABASE_SERVER_VERSION: ${{ matrix.database_server_version }}
MAILER_DSN: 'smtp://127.0.0.1:1025'
ECCUBE_PACKAGE_API_URL: 'http://127.0.0.1:8080'
ECCUBE_RESTRICT_FILE_UPLOAD: '1'
run: php -S 127.0.0.1:8000 codeception/router.php &

- name: Codeception
if: ${{ matrix.group != 'restrict-fileupload' }}
env:
APP_ENV: ${{ matrix.app_env }}
DATABASE_URL: ${{ matrix.database_url }}
DATABASE_SERVER_VERSION: ${{ matrix.database_server_version }}
MAILER_DSN: 'smtp://127.0.0.1:1025'
ECCUBE_PACKAGE_API_URL: 'http://127.0.0.1:8080'
GROUP: ${{ matrix.group }}
SYMFONY_DEPRECATIONS_HELPER: weak
run: vendor/bin/codecept -vvv run acceptance --env chrome,github_action -g ${GROUP} --skip-group restrict-file-upload --html report.html

- name: Codeception with Restrict file upload
if: ${{ matrix.group == 'restrict-fileupload' }}
env:
APP_ENV: ${{ matrix.app_env }}
DATABASE_URL: ${{ matrix.database_url }}
DATABASE_SERVER_VERSION: ${{ matrix.database_server_version }}
MAILER_DSN: 'smtp://127.0.0.1:1025'
ECCUBE_PACKAGE_API_URL: 'http://127.0.0.1:8080'
GROUP: ${{ matrix.group }}
SYMFONY_DEPRECATIONS_HELPER: weak
ECCUBE_RESTRICT_FILE_UPLOAD: '1'
run: vendor/bin/codecept -vvv run acceptance --env chrome,github_action -g ${GROUP} --html report.html

- name: Upload evidence
if: failure()
uses: actions/upload-artifact@v2
with:
name: codeception-${{ matrix.group }}-evidence
path: codeception/_output/
- name: Upload logs
if: failure()
uses: actions/upload-artifact@v2
with:
name: codeception-${{ matrix.group }}-logs
path: var/log/
175 changes: 175 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,175 @@
name: CI for TwoFactorAuthCustomer42
on:
push:
branches:
- '*'
tags:
- '*'
paths:
- '**'
- '!*.md'
pull_request:
branches:
- '*'
paths:
- '**'
- '!*.md'
jobs:
run-on-linux:
name: Run on Linux
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
eccube_version: [ '4.2','4.3' ]
php: [ '7.4', '8.0', '8.1','8.2', '8.3' ]
db: [ 'mysql', 'mysql8', 'pgsql' ]
plugin_code: [ 'TwoFactorAuthCustomer42' ]
include:
- db: mysql
database_url: mysql://root:password@127.0.0.1:3306/eccube_db
database_server_version: 5.7
database_charset: utf8mb4
- db: mysql8
database_url: mysql://root:password@127.0.0.1:3308/eccube_db
database_server_version: 8
database_charset: utf8mb4
- db: pgsql
database_url: postgres://postgres:password@127.0.0.1:5432/eccube_db
database_server_version: 14
database_charset: utf8
exclude:
- eccube_version: 4.2
php: 8.2
- eccube_version: 4.2
php: 8.3
- eccube_version: 4.3
php: 7.4
- eccube_version: 4.3
php: 8.0
services:
mysql:
image: mysql:5.7
env:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: ${{ matrix.dbname }}
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
mysql8:
image: mysql:8
env:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: ${{ matrix.dbname }}
ports:
- 3308:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
postgres:
image: postgres:14
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
POSTGRES_DB: ${{ matrix.dbname }}
ports:
- 5432:5432
# needed because the postgres container does not provide a healthcheck
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
mailcatcher:
image: schickling/mailcatcher
ports:
- 1080:1080
- 1025:1025
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup PHP
uses: nanasess/setup-php@master
with:
php-version: ${{ matrix.php }}

- name: Archive Plugin
env:
PLUGIN_CODE: ${{ matrix.plugin_code }}
run: |
tar cvzf ${GITHUB_WORKSPACE}/${PLUGIN_CODE}.tar.gz ./*

- name: Setup mock-package-api
env:
PLUGIN_CODE: ${{ matrix.plugin_code }}
run: |
mkdir -p /tmp/repos
cp ${GITHUB_WORKSPACE}/${PLUGIN_CODE}.tar.gz /tmp/repos/${PLUGIN_CODE}.tgz
docker run --name package-api -d -v /tmp/repos:/repos -e MOCK_REPO_DIR=/repos -p 8080:8080 eccube/mock-package-api:composer2

- name: Checkout EC-CUBE
uses: actions/checkout@v2
with:
repository: 'EC-CUBE/ec-cube'
ref: ${{ matrix.eccube_version }}
path: 'ec-cube'

- name: Get Composer Cache Directory
id: composer-cache
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"
- uses: actions/cache@v1
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Install to composer
working-directory: 'ec-cube'
run: composer install --no-interaction -o --apcu-autoloader

- name: Setup EC-CUBE
env:
APP_ENV: 'test'
APP_DEBUG: 0
DATABASE_URL: ${{ matrix.database_url }}
DATABASE_SERVER_VERSION: ${{ matrix.database_server_version }}
DATABASE_CHARSET: ${{ matrix.database_charset }}
ECCUBE_PACKAGE_API_URL: 'http://127.0.0.1:8080'
working-directory: 'ec-cube'
run: |
bin/console doctrine:database:create
bin/console doctrine:schema:create
bin/console eccube:fixtures:load
- name: Setup Plugin
env:
APP_ENV: 'test'
APP_DEBUG: 0
DATABASE_URL: ${{ matrix.database_url }}
DATABASE_SERVER_VERSION: ${{ matrix.database_server_version }}
DATABASE_CHARSET: ${{ matrix.database_charset }}
PLUGIN_CODE: ${{ matrix.plugin_code }}
ECCUBE_PACKAGE_API_URL: 'http://127.0.0.1:8080'
working-directory: 'ec-cube'
run: |
bin/console eccube:composer:require ec-cube/twofactorauthcustomer42
bin/console cache:clear --no-warmup
bin/console eccube:plugin:enable --code=${PLUGIN_CODE}
- name: Disable Plugin
working-directory: 'ec-cube'
env:
APP_ENV: 'test'
APP_DEBUG: 0
DATABASE_URL: ${{ matrix.database_url }}
DATABASE_SERVER_VERSION: ${{ matrix.database_server_version }}
DATABASE_CHARSET: ${{ matrix.database_charset }}
PLUGIN_CODE: ${{ matrix.plugin_code }}
ECCUBE_PACKAGE_API_URL: 'http://127.0.0.1:8080'
run: bin/console eccube:plugin:disable --code=${PLUGIN_CODE}

- name: Uninstall Plugin
env:
APP_ENV: 'test'
APP_DEBUG: 0
DATABASE_URL: ${{ matrix.database_url }}
DATABASE_SERVER_VERSION: ${{ matrix.database_server_version }}
DATABASE_CHARSET: ${{ matrix.database_charset }}
PLUGIN_CODE: ${{ matrix.plugin_code }}
ECCUBE_PACKAGE_API_URL: 'http://127.0.0.1:8080'
working-directory: 'ec-cube'
run: bin/console eccube:plugin:uninstall --code=${PLUGIN_CODE}
29 changes: 29 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Packaging for EC-CUBE Plugin
on:
release:
types: [ published ]
jobs:
deploy:
name: Build
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Packaging
working-directory: ../
run: |
rm -rf $GITHUB_WORKSPACE/.github
rm -rf $GITHUB_WORKSPACE/doc
find $GITHUB_WORKSPACE -name "dummy" -delete
find $GITHUB_WORKSPACE -name ".git*" -and ! -name ".gitkeep" -print0 | xargs -0 rm -rf
chmod -R o+w $GITHUB_WORKSPACE
cd $GITHUB_WORKSPACE
tar cvzf ../${{ github.event.repository.name }}-${{ github.event.release.tag_name }}.tar.gz ./*
- name: Upload binaries to release of TGZ
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ runner.workspace }}/${{ github.event.repository.name }}-${{ github.event.release.tag_name }}.tar.gz
asset_name: ${{ github.event.repository.name }}-${{ github.event.release.tag_name }}.tar.gz
tag: ${{ github.ref }}
overwrite: true
Loading