Merge pull request #4051 from HungDV2022/unittest_MailContentsTable_v… #5360
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
# | |
# 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 |