Skip to content

Merge pull request #4074 from thangnnmd/unitTest_MailMessagesTable_af… #5408

Merge pull request #4074 from thangnnmd/unitTest_MailMessagesTable_af…

Merge pull request #4074 from thangnnmd/unitTest_MailMessagesTable_af… #5408

Workflow file for this run

#
# test.yml
# ユニットテストの実行
# コンテナの初期化が完了する前にユニットテストを実行すると失敗してしまうので sleep で待つようにしている
# /docker/init.sh に記載している sleep の秒数プラス 10秒を目安として設定する
#
name: Test
on:
push:
tags-ignore:
- '**'
branches:
- '**'
- '!master'
pull_request:
jobs:
test:
name: Unit Test
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: Sleep for 20 seconds
run: sleep 20
- name: Compose log
run: |
cd docker
docker compose logs
- name: Install
run: |
cd docker
docker exec bc-php composer run-script install
- name: Run test suite
run: |
cd docker
docker exec bc-php composer run-script test