From 56b201d41d1130282f5d17e45b682cba4cb62c78 Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Sun, 19 Feb 2023 21:13:49 +0900 Subject: [PATCH 1/6] =?UTF-8?q?test:=20github=20action=E3=82=A8=E3=83=A9?= =?UTF-8?q?=E3=83=BC=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/tests.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1477ea2..9501566 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -48,6 +48,9 @@ jobs: steps: - uses: actions/checkout@v2 + - name: Fix up git URLs + run: echo -e '[url "https://github.com/"]\n insteadOf = "git://github.com/"' >> ~/.gitconfig + - name: environment run: | echo "GITHUB_WORKSPACE=${GITHUB_WORKSPACE}" @@ -58,7 +61,7 @@ jobs: - name: docker-compose install run: | - curl -L https://github.com/docker/compose/releases/download/1.11.2/docker-compose-`uname -s`-`uname -m` > ~/docker-compose + curl -L https://github.com/docker/compose/releases/download/1.29.2/docker-compose-`uname -s`-`uname -m` > ~/docker-compose chmod +x ~/docker-compose sudo mv ~/docker-compose /usr/local/bin/docker-compose docker-compose --version From 1d91e6a9a40b8c890cf8864c5fbe95aefcfda709 Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Sun, 19 Feb 2023 21:14:21 +0900 Subject: [PATCH 2/6] =?UTF-8?q?test:=20PHPUnit=E3=82=A8=E3=83=A9=E3=83=BC?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../GetMenuFrameSettingTest.php | 2 ++ .../SaveMenuFrameSettingTest.php | 1 + Test/Case/Model/MenuFrameSetting/SaveTest.php | 1 + Test/Fixture/MenuFrameSettingFixture.php | 34 ++++++++----------- Test/Fixture/MenuFramesPageFixture.php | 31 ++++++----------- Test/Fixture/MenuFramesRoomFixture.php | 30 ++++++---------- 6 files changed, 39 insertions(+), 60 deletions(-) diff --git a/Test/Case/Model/MenuFrameSetting/GetMenuFrameSettingTest.php b/Test/Case/Model/MenuFrameSetting/GetMenuFrameSettingTest.php index 12c3e7c..344b248 100644 --- a/Test/Case/Model/MenuFrameSetting/GetMenuFrameSettingTest.php +++ b/Test/Case/Model/MenuFrameSetting/GetMenuFrameSettingTest.php @@ -66,6 +66,7 @@ public function dataProvider() { 'id' => '2', 'frame_key' => 'frame_2', 'display_type' => 'major', + 'is_private_room_hidden' => null, 'created_user' => null, 'created' => null, 'modified_user' => null, @@ -74,6 +75,7 @@ public function dataProvider() { array('frameKey' => 'frame_8', 'expected' => array( 'frame_key' => 'frame_8', 'display_type' => 'major', + 'is_private_room_hidden' => null, 'created_user' => null, 'created' => null, 'modified_user' => null, diff --git a/Test/Case/Model/MenuFrameSetting/SaveMenuFrameSettingTest.php b/Test/Case/Model/MenuFrameSetting/SaveMenuFrameSettingTest.php index f45155d..ca34f35 100644 --- a/Test/Case/Model/MenuFrameSetting/SaveMenuFrameSettingTest.php +++ b/Test/Case/Model/MenuFrameSetting/SaveMenuFrameSettingTest.php @@ -63,6 +63,7 @@ private function __data() { 'id' => '3', 'frame_key' => 'frame_3', 'display_type' => 'major', + 'is_private_room_hidden' => null, ), ); diff --git a/Test/Case/Model/MenuFrameSetting/SaveTest.php b/Test/Case/Model/MenuFrameSetting/SaveTest.php index 59f2aab..c93246c 100644 --- a/Test/Case/Model/MenuFrameSetting/SaveTest.php +++ b/Test/Case/Model/MenuFrameSetting/SaveTest.php @@ -63,6 +63,7 @@ private function __data() { 'id' => '3', 'frame_key' => 'frame_3', 'display_type' => 'major', + 'is_private_room_hidden' => null, ), 'Menus' => array( 1 => array( diff --git a/Test/Fixture/MenuFrameSettingFixture.php b/Test/Fixture/MenuFrameSettingFixture.php index 6f13ec5..e09e084 100644 --- a/Test/Fixture/MenuFrameSettingFixture.php +++ b/Test/Fixture/MenuFrameSettingFixture.php @@ -17,25 +17,6 @@ */ class MenuFrameSettingFixture extends CakeTestFixture { -/** - * Fields - * - * @var array - */ - public $fields = array( - 'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'unsigned' => false, 'key' => 'primary', 'comment' => 'ID'), - 'frame_key' => array('type' => 'string', 'null' => false, 'default' => null, 'collate' => 'utf8_general_ci', 'comment' => 'フレームKey', 'charset' => 'utf8'), - 'display_type' => array('type' => 'string', 'null' => false, 'default' => null, 'collate' => 'utf8_general_ci', 'comment' => 'bootstrap navi type', 'charset' => 'utf8'), - 'created_user' => array('type' => 'integer', 'null' => true, 'default' => null, 'unsigned' => false, 'comment' => '作成者'), - 'created' => array('type' => 'datetime', 'null' => true, 'default' => null, 'comment' => '作成日時'), - 'modified_user' => array('type' => 'integer', 'null' => true, 'default' => null, 'unsigned' => false, 'comment' => '更新者'), - 'modified' => array('type' => 'datetime', 'null' => true, 'default' => null, 'comment' => '更新日時'), - 'indexes' => array( - 'PRIMARY' => array('column' => 'id', 'unique' => 1) - ), - 'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_general_ci', 'engine' => 'InnoDB') - ); - /** * Records * @@ -46,27 +27,42 @@ class MenuFrameSettingFixture extends CakeTestFixture { 'id' => '1', 'frame_key' => 'frame_1', 'display_type' => 'header', + 'is_private_room_hidden' => null, ), array( 'id' => '2', 'frame_key' => 'frame_2', 'display_type' => 'major', + 'is_private_room_hidden' => null, ), array( 'id' => '3', 'frame_key' => 'frame_3', 'display_type' => 'major', + 'is_private_room_hidden' => null, ), array( 'id' => '4', 'frame_key' => 'frame_4', 'display_type' => 'minor', + 'is_private_room_hidden' => null, ), array( 'id' => '5', 'frame_key' => 'frame_5', 'display_type' => 'footer', + 'is_private_room_hidden' => null, ), ); +/** + * Initialize the fixture. + * + * @return void + */ + public function init() { + require_once App::pluginPath('Menus') . 'Config' . DS . 'Schema' . DS . 'schema.php'; + $this->fields = (new MenusSchema())->tables[Inflector::tableize($this->name)]; + parent::init(); + } } diff --git a/Test/Fixture/MenuFramesPageFixture.php b/Test/Fixture/MenuFramesPageFixture.php index bed6072..c78ae31 100644 --- a/Test/Fixture/MenuFramesPageFixture.php +++ b/Test/Fixture/MenuFramesPageFixture.php @@ -17,27 +17,6 @@ */ class MenuFramesPageFixture extends CakeTestFixture { -/** - * Fields - * - * @var array - */ - public $fields = array( - 'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'unsigned' => false, 'key' => 'primary'), - 'frame_key' => array('type' => 'string', 'null' => false, 'default' => null, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'), - 'page_id' => array('type' => 'integer', 'null' => true, 'default' => null, 'unsigned' => false), - 'is_hidden' => array('type' => 'boolean', 'null' => true, 'default' => null), - 'folder_type' => array('type' => 'boolean', 'null' => true, 'default' => null), - 'created_user' => array('type' => 'integer', 'null' => true, 'default' => null, 'unsigned' => false, 'comment' => '作成者'), - 'created' => array('type' => 'datetime', 'null' => true, 'default' => null, 'comment' => '作成日時'), - 'modified_user' => array('type' => 'integer', 'null' => true, 'default' => null, 'unsigned' => false, 'comment' => '更新者'), - 'modified' => array('type' => 'datetime', 'null' => true, 'default' => null, 'comment' => '更新日時'), - 'indexes' => array( - 'PRIMARY' => array('column' => 'id', 'unique' => 1) - ), - 'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_general_ci', 'engine' => 'InnoDB') - ); - /** * Records * @@ -53,4 +32,14 @@ class MenuFramesPageFixture extends CakeTestFixture { ), ); +/** + * Initialize the fixture. + * + * @return void + */ + public function init() { + require_once App::pluginPath('Menus') . 'Config' . DS . 'Schema' . DS . 'schema.php'; + $this->fields = (new MenusSchema())->tables[Inflector::tableize($this->name)]; + parent::init(); + } } diff --git a/Test/Fixture/MenuFramesRoomFixture.php b/Test/Fixture/MenuFramesRoomFixture.php index d4da9a3..e8c5437 100644 --- a/Test/Fixture/MenuFramesRoomFixture.php +++ b/Test/Fixture/MenuFramesRoomFixture.php @@ -17,26 +17,6 @@ */ class MenuFramesRoomFixture extends CakeTestFixture { -/** - * Fields - * - * @var array - */ - public $fields = array( - 'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'unsigned' => false, 'key' => 'primary'), - 'frame_key' => array('type' => 'string', 'null' => false, 'default' => null, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'), - 'room_id' => array('type' => 'integer', 'null' => true, 'default' => null, 'unsigned' => false), - 'is_hidden' => array('type' => 'boolean', 'null' => true, 'default' => null), - 'created_user' => array('type' => 'integer', 'null' => true, 'default' => null, 'unsigned' => false, 'comment' => '作成者 | '), - 'created' => array('type' => 'datetime', 'null' => true, 'default' => null, 'comment' => '作成日時'), - 'modified_user' => array('type' => 'integer', 'null' => true, 'default' => null, 'unsigned' => false, 'comment' => '更新者 | '), - 'modified' => array('type' => 'datetime', 'null' => true, 'default' => null, 'comment' => '更新日時'), - 'indexes' => array( - 'PRIMARY' => array('column' => 'id', 'unique' => 1) - ), - 'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_general_ci', 'engine' => 'InnoDB') - ); - /** * Records * @@ -51,4 +31,14 @@ class MenuFramesRoomFixture extends CakeTestFixture { ), ); +/** + * Initialize the fixture. + * + * @return void + */ + public function init() { + require_once App::pluginPath('Menus') . 'Config' . DS . 'Schema' . DS . 'schema.php'; + $this->fields = (new MenusSchema())->tables[Inflector::tableize($this->name)]; + parent::init(); + } } From a006a5bb545122a669c7cf7dfca07eb6913cfb88 Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Fri, 24 Feb 2023 14:58:50 +0900 Subject: [PATCH 3/6] =?UTF-8?q?test:=20Github=20Action=E3=82=A8=E3=83=A9?= =?UTF-8?q?=E3=83=BC=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9501566..7cfa881 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -44,6 +44,7 @@ jobs: MYSQL_VERSION: ${{ matrix.mysql }} MYSQL_ROOT_PASSWORD: root MYSQL_DATABASE: cakephp_test + COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - uses: actions/checkout@v2 From 78627d96d191fbf9691fddd98607306bbad2648f Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Sun, 26 Feb 2023 01:22:33 +0900 Subject: [PATCH 4/6] change: Version number to 3.3.6 --- VERSION.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION.txt b/VERSION.txt index fa7adc7..9c25013 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -3.3.5 +3.3.6 From d1daff4ab399c351be228af6e4a73756aec573c6 Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Thu, 5 Oct 2023 19:18:44 +0900 Subject: [PATCH 5/6] =?UTF-8?q?test:=20github=20action=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/tests.yml | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7cfa881..6da4321 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -3,22 +3,21 @@ on: branches: - main - master - - availability pull_request: branches: - main - master - - availability name: tests jobs: setup: name: setup - runs-on: ubuntu-18.04 + runs-on: ubuntu-latest steps: - name: Slack Notification on Start uses: rtCamp/action-slack-notify@v2.2.0 + if: env.SLACK_WEBHOOK != '' env: SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_TESTS }} SLACK_CHANNEL: notify-nc3-tests @@ -28,7 +27,7 @@ jobs: tests: name: tests needs: setup - runs-on: ubuntu-18.04 + runs-on: ubuntu-latest strategy: matrix: php: [ '7.1', '7.2', '7.3', '7.4' ] @@ -92,46 +91,53 @@ jobs: docker-compose exec -T nc3app bash /opt/scripts/app-build.sh - name: phpcs (PHP CodeSniffer) + if: always() run: | cd ${NC3_DOCKER_DIR} docker-compose exec -T nc3app bash /opt/scripts/phpcs.sh - name: phpmd (PHP Mess Detector) + if: always() run: | cd ${NC3_DOCKER_DIR} docker-compose exec -T nc3app bash /opt/scripts/phpmd.sh - name: phpcpd (PHP Copy/Paste Detector) + if: always() run: | cd ${NC3_DOCKER_DIR} docker-compose exec -T nc3app bash /opt/scripts/phpcpd.sh - name: gjslint (JavaScript Style Check) + if: always() run: | cd ${NC3_DOCKER_DIR} docker-compose exec -T nc3app bash /opt/scripts/gjslint.sh - name: phpdoc (PHP Documentor) + if: always() run: | cd ${NC3_DOCKER_DIR} docker-compose exec -T nc3app bash /opt/scripts/phpdoc.sh - name: phpunit (PHP UnitTest) + if: always() run: | cd ${NC3_DOCKER_DIR} docker-compose exec -T nc3app bash /opt/scripts/phpunit.sh sudo -s chmod a+w -R ${NC3_BUILD_DIR}/build - - name: push coveralls - env: - COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} - COVERALLS_FLAG_NAME: ${{ matrix.php }} - run: | - cd ${NC3_BUILD_DIR} - ls -la ${NC3_BUILD_DIR} - vendors/bin/php-coveralls --coverage_clover=build/logs/clover.xml -v +# - name: push coveralls +# env: +# COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} +# COVERALLS_FLAG_NAME: ${{ matrix.php }} +# run: | +# cd ${NC3_BUILD_DIR} +# ls -la ${NC3_BUILD_DIR} +# vendors/bin/php-coveralls --coverage_clover=build/logs/clover.xml -v - name: docker-compose remove + if: always() run: | cd ${NC3_DOCKER_DIR} docker-compose rm -f @@ -139,7 +145,7 @@ jobs: # テスト失敗時はこちらのステップが実行される - name: Slack Notification on Failure uses: rtCamp/action-slack-notify@v2.2.0 - if: failure() + if: env.SLACK_WEBHOOK != '' && failure() env: SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_TESTS }} SLACK_CHANNEL: notify-nc3-tests @@ -148,13 +154,13 @@ jobs: teardown: name: teardown - runs-on: ubuntu-18.04 + runs-on: ubuntu-latest needs: tests steps: # テスト成功時はこちらのステップが実行される - name: Slack Notification on Success - if: success() uses: rtCamp/action-slack-notify@v2.2.0 + if: env.SLACK_WEBHOOK != '' && success() env: SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_TESTS }} SLACK_CHANNEL: notify-nc3-tests From 17d41407d5212f8d3d0464755fba480991a0c15b Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Mon, 9 Oct 2023 19:06:38 +0900 Subject: [PATCH 6/6] change: Version number to 3.3.7 --- VERSION.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION.txt b/VERSION.txt index 9c25013..86fb650 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -3.3.6 +3.3.7