From 621bc82be23b090836e854343c4b1e3bb2ce3309 Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Mon, 2 Aug 2021 22:49:17 +0900 Subject: [PATCH 01/10] =?UTF-8?q?change:=20test:=20UnitTest=E3=82=A8?= =?UTF-8?q?=E3=83=A9=E3=83=BC=E4=BF=AE=E6=AD=A3=20https://github.com/NetCo?= =?UTF-8?q?mmons3/NetCommons3/issues/1650?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Test/Fixture/CleanUpFixture.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Test/Fixture/CleanUpFixture.php b/Test/Fixture/CleanUpFixture.php index e71c5c5..38d3ffa 100644 --- a/Test/Fixture/CleanUpFixture.php +++ b/Test/Fixture/CleanUpFixture.php @@ -51,6 +51,7 @@ class CleanUpFixture extends CakeTestFixture { 'model' => 'Announcement', 'class' => 'Announcements.Announcement', 'fields' => 'content', + 'alive_func' => null, 'created_user' => '1', 'modified_user' => '1', ), @@ -60,6 +61,7 @@ class CleanUpFixture extends CakeTestFixture { 'model' => 'BbsArticle', 'class' => 'Bbses.BbsArticle', 'fields' => 'content', + 'alive_func' => null, 'created_user' => '1', 'modified_user' => '1', ), @@ -69,6 +71,7 @@ class CleanUpFixture extends CakeTestFixture { 'model' => 'BlogEntry', 'class' => 'Blogs.BlogEntry', 'fields' => 'body1,body2', // 複数の場合カンマ区切り + 'alive_func' => null, 'created_user' => '1', 'modified_user' => '1', ), @@ -78,6 +81,7 @@ class CleanUpFixture extends CakeTestFixture { 'model' => 'CalendarActionPlan', 'class' => 'Calendars.CalendarActionPlan', 'fields' => 'description', + 'alive_func' => null, 'created_user' => '1', 'modified_user' => '1', ), @@ -87,6 +91,7 @@ class CleanUpFixture extends CakeTestFixture { 'model' => 'CircularNoticeContent', 'class' => 'CircularNotices.CircularNoticeContent', 'fields' => 'content', + 'alive_func' => null, 'created_user' => '1', 'modified_user' => '1', ), @@ -96,6 +101,7 @@ class CleanUpFixture extends CakeTestFixture { 'model' => 'FaqQuestion', 'class' => 'Faqs.FaqQuestion', 'fields' => 'answer', + 'alive_func' => null, 'created_user' => '1', 'modified_user' => '1', ), @@ -105,6 +111,7 @@ class CleanUpFixture extends CakeTestFixture { 'model' => 'MultidatabaseContent', 'class' => 'Multidatabases.MultidatabaseContent', 'fields' => 'value80,value81,value82,value83,value84,value85,value86,value87,value88,value89,value90,value91,value92,value93,value94,value95,value96,value97,value98,value99,value100', + 'alive_func' => null, 'created_user' => '1', 'modified_user' => '1', ), @@ -114,6 +121,7 @@ class CleanUpFixture extends CakeTestFixture { 'model' => 'Questionnaire', 'class' => 'Questionnaires.Questionnaire', 'fields' => 'thanks_content, total_comment', + 'alive_func' => null, 'created_user' => '1', 'modified_user' => '1', ), @@ -151,6 +159,7 @@ class CleanUpFixture extends CakeTestFixture { 'model' => 'Registration', 'class' => 'Registrations.Registration', 'fields' => 'thanks_content', + 'alive_func' => null, 'created_user' => '1', 'modified_user' => '1', ), @@ -178,6 +187,7 @@ class CleanUpFixture extends CakeTestFixture { 'model' => 'ReservationActionPlan', 'class' => 'Reservations.ReservationActionPlan', 'fields' => 'description', + 'alive_func' => null, 'created_user' => '1', 'modified_user' => '1', ), @@ -187,6 +197,7 @@ class CleanUpFixture extends CakeTestFixture { 'model' => 'TaskContent', 'class' => 'Tasks.TaskContent', 'fields' => 'content', + 'alive_func' => null, 'created_user' => '1', 'modified_user' => '1', ), @@ -196,6 +207,7 @@ class CleanUpFixture extends CakeTestFixture { 'model' => 'Video', 'class' => 'Videos.Video', 'fields' => 'description', + 'alive_func' => null, 'created_user' => '1', 'modified_user' => '1', ), From 775305deca386c6fe2067d0d8decfc97f02bfb88 Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Mon, 2 Aug 2021 22:49:36 +0900 Subject: [PATCH 02/10] =?UTF-8?q?change:=20test:=20TravisCI=E3=81=8B?= =?UTF-8?q?=E3=82=89GithubAction=E3=81=AB=E5=A4=89=E6=9B=B4=20https://gith?= =?UTF-8?q?ub.com/NetCommons3/NetCommons3/issues/1650?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/tests.yml | 137 ++++++++++++++++++++++++++++++++++++ .travis.yml | 41 ----------- README.md | 7 +- phpunit.xml.dist | 4 +- 4 files changed, 142 insertions(+), 47 deletions(-) create mode 100644 .github/workflows/tests.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..d6bd01e --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,137 @@ +on: + push: + branches: + - main + - master + - availability + pull_request: + branches: + - main + - master + - availability + +name: tests + +jobs: + tests: + name: tests + runs-on: ubuntu-18.04 + strategy: + matrix: + php: [ '7.1', '7.2', '7.3', '7.4' ] + + env: + NC3_BUILD_DIR: "/opt/nc3" + NC3_DOCKER_DIR: "/opt/docker" + NC3_GIT_URL: "git://github.com/NetCommons3/NetCommons3.git" + NC3_GIT_BRANCH: "master" + PLUGIN_BUILD_DIR: ${{ github.workspace }} + PHP_VERSION: ${{ matrix.php }} + MYSQL_ROOT_PASSWORD: root + MYSQL_DATABASE: cakephp_test + + steps: + - uses: actions/checkout@v2 + + - name: environment + run: | + echo "GITHUB_WORKSPACE=${GITHUB_WORKSPACE}" + echo "PLUGIN_BUILD_DIR=${PLUGIN_BUILD_DIR}" + echo "PHP_VERSION=${PHP_VERSION}" + ls -al ${PLUGIN_BUILD_DIR} + + - 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 + chmod +x ~/docker-compose + sudo mv ~/docker-compose /usr/local/bin/docker-compose + docker-compose --version + + - name: git clone nc3 + run: git clone -b ${NC3_GIT_BRANCH} ${NC3_GIT_URL} ${NC3_BUILD_DIR} + + - name: git clone nc3_docker + run: git clone https://github.com/NetCommons3/nc3app-docker.git ${NC3_DOCKER_DIR} + + - name: docker-compose start + run: | + cd ${NC3_DOCKER_DIR} + docker-compose up -d + docker-compose start + + - run: docker ps + + - name: check libraries + run: | + cd ${NC3_DOCKER_DIR} + docker-compose exec -T nc3app bash /opt/scripts/start-on-docker.sh + + - name: nc3 build + run: | + cd ${NC3_DOCKER_DIR} + docker-compose exec -T nc3app bash /opt/scripts/app-build.sh + + - name: phpcs (PHP CodeSniffer) + run: | + cd ${NC3_DOCKER_DIR} + docker-compose exec -T nc3app bash /opt/scripts/phpcs.sh + + - name: phpmd (PHP Mess Detector) + run: | + cd ${NC3_DOCKER_DIR} + docker-compose exec -T nc3app bash /opt/scripts/phpmd.sh + + - name: phpcpd (PHP Copy/Paste Detector) + run: | + cd ${NC3_DOCKER_DIR} + docker-compose exec -T nc3app bash /opt/scripts/phpcpd.sh + + - name: gjslint (JavaScript Style Check) + run: | + cd ${NC3_DOCKER_DIR} + docker-compose exec -T nc3app bash /opt/scripts/gjslint.sh + + - name: phpdoc (PHP Documentor) + run: | + cd ${NC3_DOCKER_DIR} + docker-compose exec -T nc3app bash /opt/scripts/phpdoc.sh + + - name: phpunit (PHP UnitTest) + 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: docker-compose remove + run: | + cd ${NC3_DOCKER_DIR} + docker-compose rm -f + + # テスト成功時はこちらのステップが実行される + - name: Slack Notification on Success + if: success() + uses: rtCamp/action-slack-notify@v2.2.0 + env: + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} + SLACK_CHANNEL: notify-netcommons3 + SLACK_TITLE: "${{ github.repository }}(${{ matrix.php }})" + SLACK_COLOR: good + + # テスト失敗時はこちらのステップが実行される + - name: Slack Notification on Failure + uses: rtCamp/action-slack-notify@v2.2.0 + if: failure() + env: + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} + SLACK_CHANNEL: notify-netcommons3 + SLACK_TITLE: "${{ github.repository }}(${{ matrix.php }})" + SLACK_COLOR: danger diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 202ca75..0000000 --- a/.travis.yml +++ /dev/null @@ -1,41 +0,0 @@ -language: php - -php: - - 7.0 - - 7.1 - - 7.2 - - 7.3.24 - - 7.4 - -sudo: false -dist: trusty - -env: - matrix: - - NETCOMMONS_VERSION=master DB=mysql - global: - - secure: "S190W5bNgSM35uMwyHrUM4/5ipE1SemyfcjGQyRAVtcuQwAug/P5P5wDPrPeQyzgV7c5nDkxjBBr9pJ6xUG3dkPgiqTxchBeccishuMmUUs8pO1kd/o+DEJ3IoZyL5benFZyvTKGaSrZncqlHz0T/tARBQXiK7/ziAZ/qgtsyzXojRXD6Ro8BflphqhsZhpM45MesTSCr7oBfTryq9C6a6NBI7kByw01OpQWYh3F5EG/wEFTIR9gmcCUQzi4SHv9HixRAqjIKbdH1/4QQUVKJsQVvXbYDNbnrmw4scUJGwvFTx5sagLbnEuVGZ7o8ZA6DvUNWWFeaRft9V2NhJRu0hNO69DfyE/16CVqLLv8cSsM5BnMxU43NfzpPw2KkBg55QSLK7j53Tsy7WOSqSgx11Fek1E+TyyuVLLJAlQLuk7+mZBFlGXfMaU17DfFdUO+mZ4F+Bsa1OcTVABl1MmXnhntYADEBQ6bXrDk0I4GXNQ3xCklYGfKt8mbsb8gNRIJIkyRnYDLVB7lkXcMOL25DGORGftrSApQH7q1MRc8bLMtTcXdr+NZioOFrr1UgxQPgOfIEVZ2YepMw2sc0pkfYRWobm8zcIAjpJNPbM7JUYnlYi96OOFsabW4W3IisdPEA8mq8ALlS3kYpwN0jhBt+7/nPAwD8igRAOvjYoIU3t0=" - - GIT_COMMITTER_NAME=akagane99 - - GIT_COMMITTER_EMAIL=akagane99@gmail.com - - GIT_AUTHOR_NAME=akagane99 - - GIT_AUTHOR_EMAIL=akagane99@gmail.com - -before_script: - - export NETCOMMONS_BUILD_DIR=`dirname $TRAVIS_BUILD_DIR`/NetCommons3 - - git clone git://github.com/NetCommons3/NetCommons3 $NETCOMMONS_BUILD_DIR - - cd $NETCOMMONS_BUILD_DIR - - git checkout $NETCOMMONS_VERSION - - . tools/build/plugins/cakephp/travis/pre.sh - -script: - - travis_wait . tools/build/plugins/cakephp/travis/main.sh - -after_script: - - . tools/build/plugins/cakephp/travis/post.sh - -notifications: - email: - recipients: - - netcommons3@googlegroups.com - on_success: never # default: change - on_failure: always # default: always diff --git a/README.md b/README.md index c6ea745..782977d 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,9 @@ -# CleanUp -CleanUp for NetCommons3 +CleanUp +============= -[![Build Status](https://api.travis-ci.org/NetCommons3/CleanUp.svg?branch=master)](https://travis-ci.org/NetCommons3/CleanUp) +[![Tests Status](https://github.com/NetCommons3/CleanUp/actions/workflows/tests.yml/badge.svg?branch=master)](https://github.com/NetCommons3/CleanUp/actions/workflows/tests.yml) [![Coverage Status](https://coveralls.io/repos/NetCommons3/CleanUp/badge.svg?branch=master)](https://coveralls.io/r/NetCommons3/CleanUp?branch=master) +[![Stable Version](https://img.shields.io/packagist/v/netcommons/clean-up.svg?label=stable)](https://packagist.org/packages/netcommons/clean-up) ### [phpdoc](https://netcommons3.github.io/NetCommons3Docs/phpdoc/CleanUp/) diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 5dff37c..3e7c4ee 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -3,9 +3,6 @@ - - - app/Plugin/CleanUp @@ -21,5 +18,6 @@ + From 27ec7aab55f9286b32f47159440957d9d1d835e6 Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Tue, 10 Aug 2021 11:33:23 +0900 Subject: [PATCH 03/10] =?UTF-8?q?fix:=20test:=20UnitTest=E3=82=A8=E3=83=A9?= =?UTF-8?q?=E3=83=BC=E4=BF=AE=E6=AD=A3=20https://github.com/NetCommons3/Ne?= =?UTF-8?q?tCommons3/issues/1650?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CleanUpShell/GetOptionParserTest.php | 4 ++- Test/Fixture/CleanUpFixture.php | 34 ++++++------------- 2 files changed, 14 insertions(+), 24 deletions(-) diff --git a/Test/Case/Console/Command/CleanUpShell/GetOptionParserTest.php b/Test/Case/Console/Command/CleanUpShell/GetOptionParserTest.php index 179dc10..3885dae 100644 --- a/Test/Case/Console/Command/CleanUpShell/GetOptionParserTest.php +++ b/Test/Case/Console/Command/CleanUpShell/GetOptionParserTest.php @@ -23,7 +23,9 @@ class CleanUpConsoleCommandCleanUpShellGetOptionParserTest extends CleanUpConsol * * @var array */ - public $fixtures = array(); + public $fixtures = array( + 'plugin.clean_up.clean_up', + ); /** * Plugin name diff --git a/Test/Fixture/CleanUpFixture.php b/Test/Fixture/CleanUpFixture.php index 38d3ffa..4f0f98f 100644 --- a/Test/Fixture/CleanUpFixture.php +++ b/Test/Fixture/CleanUpFixture.php @@ -16,29 +16,6 @@ */ class CleanUpFixture extends CakeTestFixture { -/** - * Fields - * - * @var array - */ - public $fields = array( - 'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'unsigned' => false, 'key' => 'primary'), - 'plugin_key' => array('type' => 'string', 'null' => false, 'default' => null, 'key' => 'index', 'collate' => 'utf8_general_ci', 'comment' => 'プラグインKey', 'charset' => 'utf8'), - 'model' => array('type' => 'string', 'null' => false, 'default' => null, 'collate' => 'utf8_general_ci', 'comment' => 'モデル', 'charset' => 'utf8'), - 'class' => array('type' => 'string', 'null' => false, 'default' => null, 'collate' => 'utf8_general_ci', 'comment' => 'クラス記法', 'charset' => 'utf8'), - 'fields' => array('type' => 'string', 'null' => false, 'default' => null, 'collate' => 'utf8_general_ci', 'comment' => 'WYSIWYG対象フィールド名(複数はカンマ区切り)', 'charset' => 'utf8'), - 'alive_func' => array('type' => 'string', 'null' => true, 'default' => null, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'), - 'created_user' => array('type' => 'integer', 'null' => true, 'default' => null, 'unsigned' => false), - 'created' => array('type' => 'datetime', 'null' => true, 'default' => null), - 'modified_user' => array('type' => 'integer', 'null' => true, 'default' => null, 'unsigned' => false), - 'modified' => array('type' => 'datetime', 'null' => true, 'default' => null), - 'indexes' => array( - 'PRIMARY' => array('column' => 'id', 'unique' => 1), - 'plugin_key' => array('column' => 'plugin_key', 'unique' => 0) - ), - 'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_general_ci', 'engine' => 'InnoDB') - ); - /** * Records * @@ -213,4 +190,15 @@ class CleanUpFixture extends CakeTestFixture { ), ); +/** + * Initialize the fixture. + * + * @return void + */ + public function init() { + require_once App::pluginPath('CleanUp') . 'Config' . DS . 'Schema' . DS . 'schema.php'; + $this->fields = (new CleanUpSchema())->tables['clean_ups']; + parent::init(); + } + } From b51fafc858448452c997b8547bff83b5de0b3e25 Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Tue, 10 Aug 2021 23:19:42 +0900 Subject: [PATCH 04/10] =?UTF-8?q?change:=20test:=20Slack=E9=80=9A=E7=9F=A5?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3,=20mysql8.0=E3=83=86=E3=82=B9=E3=83=88?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0=20https://github.com/NetCommons3/NetCommons3?= =?UTF-8?q?/issues/1650?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 35 ++++++++++++++++++++++++-- .github/workflows/tests.yml | 47 +++++++++++++++++++++++++---------- 2 files changed, 67 insertions(+), 15 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a3225bc..592d72f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,16 +4,25 @@ on: tags: - '3*' -name: Create Release +name: create_release jobs: build: - name: Create Release + name: create_release runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v2 + - name: Slack Notification on Start + uses: rtCamp/action-slack-notify@v2.2.0 + env: + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_RELEASE }} + SLACK_CHANNEL: notify-nc3-release + SLACK_TITLE: "${{ github.repository }}" + SLACK_COLOR: "#f0ad4e" + SLACK_MESSAGE: "Start Job" + - name: Create Release id: create_release uses: actions/create-release@v1 @@ -26,3 +35,25 @@ jobs: NetCommons ${{ github.ref }} released. draft: false prerelease: false + + # テスト成功時はこちらのステップが実行される + - name: Slack Notification on Finish + uses: rtCamp/action-slack-notify@v2.2.0 + if: success() + env: + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_RELEASE }} + SLACK_CHANNEL: notify-nc3-release + SLACK_TITLE: "${{ github.repository }}" + SLACK_COLOR: good + SLACK_MESSAGE: "Job Success" + + # テスト失敗時はこちらのステップが実行される + - name: Slack Notification on Failure + uses: rtCamp/action-slack-notify@v2.2.0 + if: failure() + env: + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_RELEASE }} + SLACK_CHANNEL: notify-nc3-tests + SLACK_TITLE: "${{ github.repository }}" + SLACK_COLOR: danger + SLACK_MESSAGE: "Job Failure" diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d6bd01e..1477ea2 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -13,12 +13,26 @@ on: name: tests jobs: + setup: + name: setup + runs-on: ubuntu-18.04 + steps: + - name: Slack Notification on Start + uses: rtCamp/action-slack-notify@v2.2.0 + env: + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_TESTS }} + SLACK_CHANNEL: notify-nc3-tests + SLACK_TITLE: "${{ github.repository }}" + SLACK_COLOR: "#f0ad4e" + tests: name: tests + needs: setup runs-on: ubuntu-18.04 strategy: matrix: php: [ '7.1', '7.2', '7.3', '7.4' ] + mysql: [ '5.7', '8.0' ] env: NC3_BUILD_DIR: "/opt/nc3" @@ -27,6 +41,7 @@ jobs: NC3_GIT_BRANCH: "master" PLUGIN_BUILD_DIR: ${{ github.workspace }} PHP_VERSION: ${{ matrix.php }} + MYSQL_VERSION: ${{ matrix.mysql }} MYSQL_ROOT_PASSWORD: root MYSQL_DATABASE: cakephp_test @@ -38,6 +53,7 @@ jobs: echo "GITHUB_WORKSPACE=${GITHUB_WORKSPACE}" echo "PLUGIN_BUILD_DIR=${PLUGIN_BUILD_DIR}" echo "PHP_VERSION=${PHP_VERSION}" + echo "MYSQL_VERSION=${MYSQL_VERSION}" ls -al ${PLUGIN_BUILD_DIR} - name: docker-compose install @@ -116,22 +132,27 @@ jobs: cd ${NC3_DOCKER_DIR} docker-compose rm -f - # テスト成功時はこちらのステップが実行される - - name: Slack Notification on Success - if: success() - uses: rtCamp/action-slack-notify@v2.2.0 - env: - SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} - SLACK_CHANNEL: notify-netcommons3 - SLACK_TITLE: "${{ github.repository }}(${{ matrix.php }})" - SLACK_COLOR: good - # テスト失敗時はこちらのステップが実行される - name: Slack Notification on Failure uses: rtCamp/action-slack-notify@v2.2.0 if: failure() env: - SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} - SLACK_CHANNEL: notify-netcommons3 - SLACK_TITLE: "${{ github.repository }}(${{ matrix.php }})" + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_TESTS }} + SLACK_CHANNEL: notify-nc3-tests + SLACK_TITLE: "${{ github.repository }}(php${{ matrix.php }}, mysql${{ matrix.mysql }})" SLACK_COLOR: danger + + teardown: + name: teardown + runs-on: ubuntu-18.04 + needs: tests + steps: + # テスト成功時はこちらのステップが実行される + - name: Slack Notification on Success + if: success() + uses: rtCamp/action-slack-notify@v2.2.0 + env: + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_TESTS }} + SLACK_CHANNEL: notify-nc3-tests + SLACK_TITLE: "${{ github.repository }}" + SLACK_COLOR: good From d48f95df3a8a0ca6ef9e96afccb7121b8f659dc5 Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Fri, 13 Aug 2021 15:04:40 +0900 Subject: [PATCH 05/10] change: Version number to 3.3.4 --- VERSION.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION.txt b/VERSION.txt index 619b537..a0891f5 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -3.3.3 +3.3.4 From bdaeaa74a04597e388d8a8043f33ff8a988edafe Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Fri, 11 Feb 2022 18:36:46 +0900 Subject: [PATCH 06/10] change: Version number to 3.3.5 --- VERSION.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION.txt b/VERSION.txt index a0891f5..fa7adc7 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -3.3.4 +3.3.5 From a9516a2755e26b144239a180558126617a814935 Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Fri, 24 Feb 2023 13:34:52 +0900 Subject: [PATCH 07/10] =?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 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1477ea2..7cfa881 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -44,10 +44,14 @@ jobs: MYSQL_VERSION: ${{ matrix.mysql }} MYSQL_ROOT_PASSWORD: root MYSQL_DATABASE: cakephp_test + COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} 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 +62,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 cb9424afab7bb9ac54e04493f3b71a5b49545cac Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Sat, 25 Feb 2023 21:42:31 +0900 Subject: [PATCH 08/10] 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 894e56bfe62087014ee44d92690611e7ebe2d660 Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Thu, 5 Oct 2023 17:17:18 +0900 Subject: [PATCH 09/10] =?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 | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7cfa881..eb2068b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -15,10 +15,11 @@ 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 +29,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 +93,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 +147,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 +156,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 766a4faf85fa58bba06913088cce0580af318c18 Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Mon, 9 Oct 2023 15:58:55 +0900 Subject: [PATCH 10/10] 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