From 8623527291c207b7211874c8e2f82e331535ec85 Mon Sep 17 00:00:00 2001 From: Ryuji AMANO Date: Thu, 9 May 2019 11:22:51 +0900 Subject: [PATCH 01/26] =?UTF-8?q?change:=20beforeValidate()=E3=82=92?= =?UTF-8?q?=E5=91=BC=E3=81=B3=E5=87=BA=E3=81=99=E3=81=9F=E3=81=B3=E3=81=AB?= =?UTF-8?q?Hash::merge=E3=81=A7=E3=83=90=E3=83=AA=E3=83=87=E3=83=BC?= =?UTF-8?q?=E3=82=B7=E3=83=A7=E3=83=B3=E3=83=AB=E3=83=BC=E3=83=AB=E3=81=8C?= =?UTF-8?q?=E5=A2=97=E3=81=88=E3=82=8B=E3=81=93=E3=81=A8=E3=81=8C=E3=81=82?= =?UTF-8?q?=E3=82=8B=E3=81=AE=E3=82=92=E4=BF=AE=E6=AD=A3=E3=80=82ValidateM?= =?UTF-8?q?erge::merge=E3=81=B8=E7=BD=AE=E3=81=8D=E6=8F=9B=E3=81=88?= =?UTF-8?q?=E3=81=9F=20Refs=20https://github.com/NetCommons3/NetCommons3/i?= =?UTF-8?q?ssues/1486?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Model/Behavior/WorkflowBehavior.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Model/Behavior/WorkflowBehavior.php b/Model/Behavior/WorkflowBehavior.php index 151c7e3..4fb2ffc 100644 --- a/Model/Behavior/WorkflowBehavior.php +++ b/Model/Behavior/WorkflowBehavior.php @@ -175,7 +175,7 @@ public function beforeValidate(Model $model, $options = array()) { $statuses = self::$statusesForEditor; } - $model->validate = Hash::merge($model->validate, array( + $model->validate = ValidateMerge::merge($model->validate, array( 'status' => array( 'numeric' => array( 'rule' => array('numeric'), From 95581428b2598419a27e86f3da92bc0ce8c08924 Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Mon, 23 Sep 2019 22:02:40 +0900 Subject: [PATCH 02/26] =?UTF-8?q?fix:=20test:=20travis-ci=E3=81=AEphp7.2?= =?UTF-8?q?=E5=AF=BE=E5=BF=9C=20https://github.com/NetCommons3/NetCommons3?= =?UTF-8?q?/issues/1451?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .travis.yml | 2 ++ phpunit.xml.dist | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 19508b2..87349f3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,8 +6,10 @@ php: - 5.6 - 7.0 - 7.1 + - 7.2 sudo: false +dist: trusty env: matrix: diff --git a/phpunit.xml.dist b/phpunit.xml.dist index b636b39..538c9e2 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -14,6 +14,5 @@ - From 2a886a7efa72f871d1bd5bddb08a68e45067ed07 Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Sat, 14 Mar 2020 15:39:32 +0900 Subject: [PATCH 03/26] =?UTF-8?q?change:=20test:=20travis.yml=E3=81=8B?= =?UTF-8?q?=E3=82=89php5.4,5.5=E3=82=92=E5=89=8A=E9=99=A4=E3=80=82php7.3,7?= =?UTF-8?q?.4=E3=82=92=E8=BF=BD=E5=8A=A0=20https://github.com/NetCommons3/?= =?UTF-8?q?NetCommons3/issues/1560?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 87349f3..e027d37 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,12 +1,12 @@ language: php php: - - 5.4 - - 5.5 - 5.6 - 7.0 - 7.1 - 7.2 + - 7.3 + - 7.4 sudo: false dist: trusty From 57898f1718667b81432b735b75c35e6eebee427b Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Sat, 8 Aug 2020 16:39:34 +0900 Subject: [PATCH 04/26] =?UTF-8?q?change:=20test:=20Travis=E3=81=8B?= =?UTF-8?q?=E3=82=89PHP5.6=E3=82=92=E5=89=8A=E9=99=A4,php72=E4=BB=A5?= =?UTF-8?q?=E9=99=8D=E3=81=A7UnitTest=E3=81=A7Warning=E3=81=8C=E5=87=BA?= =?UTF-8?q?=E3=82=8B=E3=81=9F=E3=82=81=E4=BF=AE=E6=AD=A3=20https://github.?= =?UTF-8?q?com/NetCommons3/NetCommons3/issues/1588?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .travis.yml | 1 - phpunit.xml.dist | 6 ++++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index e027d37..de13f50 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,6 @@ language: php php: - - 5.6 - 7.0 - 7.1 - 7.2 diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 538c9e2..7d53ead 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,5 +1,11 @@ + + + + + + app/Plugin/Workflow From f3a20ac52c445a4cadfbd98bcaa9eae7a28e838f Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Wed, 26 Aug 2020 20:23:46 +0900 Subject: [PATCH 05/26] change: Version number to 3.3.2 --- VERSION.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 VERSION.txt diff --git a/VERSION.txt b/VERSION.txt new file mode 100644 index 0000000..4772543 --- /dev/null +++ b/VERSION.txt @@ -0,0 +1 @@ +3.3.2 From e82a059323c1ebc27391dc35feccf5f86ba3e7d3 Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Sun, 13 Dec 2020 20:27:44 +0900 Subject: [PATCH 06/26] =?UTF-8?q?fix:=20test:=20TravisCI=E3=81=AEphp7.3?= =?UTF-8?q?=E3=81=A7=E3=82=A8=E3=83=A9=E3=83=BC=E3=81=8C=E5=87=BA=E3=82=8B?= =?UTF-8?q?=E3=81=9F=E3=82=81=E4=BF=AE=E6=AD=A3=20https://github.com/NetCo?= =?UTF-8?q?mmons3/NetCommons3/issues/1618?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index de13f50..d7fa1ce 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,7 @@ php: - 7.0 - 7.1 - 7.2 - - 7.3 + - 7.3.24 - 7.4 sudo: false From 301fff759e83ab8127bd42826eaa679497499333 Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Sat, 23 Jan 2021 14:10:39 +0900 Subject: [PATCH 07/26] =?UTF-8?q?add:=20release=E3=82=BF=E3=82=B0=E4=BB=98?= =?UTF-8?q?=E3=81=91=E3=81=AEgithub=20action=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://github.com/NetCommons3/NetCommons3/issues/1619 --- .github/workflows/release.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..a3225bc --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,28 @@ +on: + push: + # Sequence of patterns matched against refs/tags + tags: + - '3*' + +name: Create Release + +jobs: + build: + name: Create Release + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token + with: + tag_name: ${{ github.ref }} + release_name: ${{ github.ref }} + body: | + NetCommons ${{ github.ref }} released. + draft: false + prerelease: false From 14857dd228636ccd698a9b4b80281cd3b6b51f3c Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Sat, 23 Jan 2021 14:10:44 +0900 Subject: [PATCH 08/26] change: Version number to 3.3.3 --- VERSION.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION.txt b/VERSION.txt index 4772543..619b537 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -3.3.2 +3.3.3 From b0dd06a2abd55cf75f8e3ced2d846710201db9cd Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Wed, 28 Jul 2021 10:26:45 +0900 Subject: [PATCH 09/26] =?UTF-8?q?fix:=20=E6=97=A5=E6=AC=A1=E8=A1=A8?= =?UTF-8?q?=E7=A4=BA=E3=82=92DateHelper=E3=82=92=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E3=81=97=E3=81=A6=E3=81=AA=E3=81=8B=E3=81=A3=E3=81=9F=E3=81=9F?= =?UTF-8?q?=E3=82=81UTC=E3=81=A7=E8=A1=A8=E7=A4=BA=E3=81=95=E3=82=8C?= =?UTF-8?q?=E3=82=8B=E3=83=90=E3=82=B0=E4=BF=AE=E6=AD=A3=20https://github.?= =?UTF-8?q?com/NetCommons3/NetCommons3/issues/1653?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- View/Elements/index.ctp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/View/Elements/index.ctp b/View/Elements/index.ctp index 1bcfc9c..95da861 100644 --- a/View/Elements/index.ctp +++ b/View/Elements/index.ctp @@ -17,7 +17,7 @@
DisplayUser->handleLink($comment, array('avatar' => true)); ?> - + Date->dateFormat($comment['WorkflowComment']['created']); ?>
From 0c411918ae92c4f3e6b04a1de57a06c752105885 Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Mon, 2 Aug 2021 22:19:14 +0900 Subject: [PATCH 10/26] =?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 | 42 ----------- README.md | 11 +-- phpunit.xml.dist | 4 +- 4 files changed, 141 insertions(+), 53 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 d7fa1ce..0000000 --- a/.travis.yml +++ /dev/null @@ -1,42 +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: "Zne29ern9LsmaFB4IXG/Qu794ansG0duVm020H4SwOeHF6+wvgOqvfW2HCvuyPD5ZBNvwvy7Zx6euIP0nrlv8HJCpJLGqgcIH6DiC978Nu+cELS05AzbHGYkMKakjXX1LJIybmoQWBMfIWGQgGpyXB31Nmzr+BbZpQGdFREs1U0MF2S300XO6UrIKfBnJQINdg/YzDW5jAjtFPh79vMO2zdTVrkBLuDYuj4GhmOwwa9RBvU8nBvsPGvlmCqnY/+Od22OWir3qQ2xIJGVO33fDQROiSYu42py+RoWTzFsi/MTU4vSYDhTLNRj8Fnq4xQ/KZRUcJp+cNxQ8+mcTlyH27U5Hx8DJx7bPqgB4zP7z7mnCqML0WwkZ8Vr3oohQ19RWWwoeevp2fL+2Ltcg4aKeVRsdm3GRF87AucSZEeOKkk9Ah4UQMFYeReazeltMRnzW1U4LqIkyU9+fxEcmZdk6PGpyllyTjP0DFg1JXLwNYkow5OuWeZSm+VMYxI4AH/Jfq3G2xIBpr42rxjGAe7lNReSUbcxclG/NhMCCXD4Dgd2p1r46Jh8bE9JOaK7t+WYsRj98Ah/ijBtpHzyEZ54SE67z3yiG1DnnhUQmkGuxSoz/hvk27uHvtUMPbWXdr6Rgu9T6L02hWZPm+XVzp4Iu4jyg4UliJEdCHuyThdIlwU=" - - GIT_COMMITTER_NAME=s-nakajima - - GIT_COMMITTER_EMAIL=nakajimashouhei@gmail.com - - GIT_AUTHOR_NAME=s-nakajima - - GIT_AUTHOR_EMAIL=nakajimashouhei@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 - - travis_wait . tools/build/plugins/cakephp/travis/pre.sh - - . tools/build/plugins/cakephp/travis/environment.sh - -script: - - . 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 32e118e..53be543 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,6 @@ Workflow ============== -Workflow for NetComomns3 - -[![Build Status](https://api.travis-ci.org/NetCommons3/Workflow.png?branch=master)](https://travis-ci.org/NetCommons3/Workflow) -[![Coverage Status](https://coveralls.io/repos/NetCommons3/Workflow/badge.png?branch=master)](https://coveralls.io/r/NetCommons3/Workflow?branch=master) - -| dependencies | status | -| ------------- | ------ | -| composer.json | [![Dependency Status](https://www.versioneye.com/user/projects/55e64f4fe7e33d000c0007e9/badge.png)](https://www.versioneye.com/user/projects/55e64f4fe7e33d000c0007e9) | +[![Tests Status](https://github.com/NetCommons3/Workflow/actions/workflows/tests.yml/badge.svg?branch=master)](https://github.com/NetCommons3/Workflow/actions/workflows/tests.yml) +[![Coverage Status](https://coveralls.io/repos/NetCommons3/Workflow/badge.svg?branch=master)](https://coveralls.io/r/NetCommons3/Workflow?branch=master) +[![Stable Version](https://img.shields.io/packagist/v/netcommons/workflow.svg?label=stable)](https://packagist.org/packages/netcommons/workflow) diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 7d53ead..dffa9d0 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -3,9 +3,6 @@ - - - app/Plugin/Workflow @@ -20,5 +17,6 @@ + From 01f2f5f4ea41b16f6aa8a653c4bc917cf2488bc7 Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Wed, 4 Aug 2021 11:12:59 +0900 Subject: [PATCH 11/26] =?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 --- Test/Case/View/Elements/FormTest.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Test/Case/View/Elements/FormTest.php b/Test/Case/View/Elements/FormTest.php index db61a5f..56f3537 100644 --- a/Test/Case/View/Elements/FormTest.php +++ b/Test/Case/View/Elements/FormTest.php @@ -24,7 +24,9 @@ class WorkflowViewElementsFormTest extends NetCommonsControllerTestCase { * * @var array */ - public $fixtures = array(); + public $fixtures = array( + 'plugin.workflow.workflow_comment', + ); /** * Plugin name From e1aaf58c517b72c650263e9d36a4cab8250c89f4 Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Wed, 11 Aug 2021 16:33:15 +0900 Subject: [PATCH 12/26] =?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 --- .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 1b31d0aff3d42c2c98a9ba4ae107de88e2d519e9 Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Fri, 13 Aug 2021 19:34:27 +0900 Subject: [PATCH 13/26] 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 5efaed6ebd3096234859cdf34cf775c3d151d6d4 Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Fri, 11 Feb 2022 23:16:55 +0900 Subject: [PATCH 14/26] 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 db21ac45f86d3b4244268d514471fb908a184e88 Mon Sep 17 00:00:00 2001 From: Ryuji AMANO Date: Sun, 27 Nov 2022 14:52:59 +0900 Subject: [PATCH 15/26] fix: edit problem --- Model/Behavior/WorkflowBehavior.php | 12 +++++++++++- .../WorkflowBehavior/CanEditWorkflowContentTest.php | 1 + 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Model/Behavior/WorkflowBehavior.php b/Model/Behavior/WorkflowBehavior.php index 4fb2ffc..94d1640 100644 --- a/Model/Behavior/WorkflowBehavior.php +++ b/Model/Behavior/WorkflowBehavior.php @@ -292,7 +292,16 @@ public function getWorkflowConditions(Model $model, $conditions = array()) { $langConditions = array(); } + $currentBlockId = Current::read('Block.id'); + $blockConditions = []; + if ($currentBlockId && $model->hasField('block_id')) { + $blockConditions = [ + $model->alias . '.block_id' => $currentBlockId, + ]; + } + $conditions = Hash::merge( + $blockConditions, array( $langConditions, array('OR' => array($activeConditions, $latestConditons)) @@ -361,7 +370,8 @@ public function canEditWorkflowContent(Model $model, $data) { if (! isset($data[$model->alias]['created_user'])) { return false; } - return ((int)$data[$model->alias]['created_user'] === (int)Current::read('User.id')); + return (Current::permission('content_creatable') && + ((int)$data[$model->alias]['created_user'] === (int)Current::read('User.id'))); } /** diff --git a/Test/Case/Model/Behavior/WorkflowBehavior/CanEditWorkflowContentTest.php b/Test/Case/Model/Behavior/WorkflowBehavior/CanEditWorkflowContentTest.php index 710cbb7..9c11277 100644 --- a/Test/Case/Model/Behavior/WorkflowBehavior/CanEditWorkflowContentTest.php +++ b/Test/Case/Model/Behavior/WorkflowBehavior/CanEditWorkflowContentTest.php @@ -92,6 +92,7 @@ public function testCanEditWorkflowContent($permission, $assert, $userId, $data) Current::$current['User']['id'] = $userId; Current::write('Room.id', '2'); Current::writePermission('2', 'content_editable', $permission); + Current::writePermission('2', 'content_creatable', true); $result = $this->TestModel->canEditWorkflowContent($data); //チェック From 04dca22e3394acd8358cc134b78fe83deff5b379 Mon Sep 17 00:00:00 2001 From: Ryuji AMANO Date: Sun, 27 Nov 2022 15:16:55 +0900 Subject: [PATCH 16/26] =?UTF-8?q?fix:=20test:=20github=20actions=E3=81=AE?= =?UTF-8?q?=E3=82=A8=E3=83=A9=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 2618ac5661aeb3ce0381b0761d4536bbf54e5671 Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Fri, 24 Feb 2023 17:34:10 +0900 Subject: [PATCH 17/26] =?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 fa3961002a5d76e56805d1759ecfcf39fe4b81cd Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Sun, 26 Feb 2023 08:18:54 +0900 Subject: [PATCH 18/26] 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 177185656236f79b24c5588c9f17dccff3e62b5f Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Thu, 6 Apr 2023 18:24:44 +0900 Subject: [PATCH 19/26] =?UTF-8?q?fix:=20=E6=8E=B2=E7=A4=BA=E6=9D=BF?= =?UTF-8?q?=E3=81=A7=E3=80=81=E5=85=AC=E9=96=8B=E6=A8=A9=E9=99=90=E3=81=8C?= =?UTF-8?q?=E3=81=AA=E3=81=84=E3=83=A6=E3=83=BC=E3=82=B6=E8=BF=94=E4=BF=A1?= =?UTF-8?q?=E3=81=99=E3=82=8B=E3=81=A8=E3=80=81=E8=A1=A8=E7=A4=BA=E3=83=BB?= =?UTF-8?q?=E7=B7=A8=E9=9B=86=E3=83=BB=E5=89=8A=E9=99=A4=E3=81=8C=E3=81=A7?= =?UTF-8?q?=E3=81=8D=E3=81=AA=E3=81=8F=E3=81=AA=E3=81=A3=E3=81=A6=E3=81=84?= =?UTF-8?q?=E3=81=9F=E3=81=9F=E3=82=81=E4=BF=AE=E6=AD=A3=20https://github.?= =?UTF-8?q?com/researchmap/RmNetCommons3/issues/2806?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Model/Behavior/WorkflowBehavior.php | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/Model/Behavior/WorkflowBehavior.php b/Model/Behavior/WorkflowBehavior.php index 94d1640..ac32061 100644 --- a/Model/Behavior/WorkflowBehavior.php +++ b/Model/Behavior/WorkflowBehavior.php @@ -227,16 +227,23 @@ private function __hasSaveField(Model $model, $needle) { * * @param Model $model Model using this behavior * @param array $conditions Model::find conditions default value + * @param bool $useCommentCreatable コメントの作成権限でもチェックするかどうか * @return array Conditions data * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.BooleanArgumentFlag) */ - public function getWorkflowConditions(Model $model, $conditions = array()) { + public function getWorkflowConditions( + Model $model, + $conditions = array(), + $useCommentCreatable = false + ) { if (Current::permission('content_editable')) { $activeConditions = array(); $latestConditons = array( $model->alias . '.is_latest' => true, ); - } elseif (Current::permission('content_creatable')) { + } elseif (Current::permission('content_creatable') || + $useCommentCreatable && Current::permission('content_comment_creatable')) { $activeConditions = array( $model->alias . '.is_active' => true, $model->alias . '.created_user !=' => Current::read('User.id'), @@ -318,12 +325,19 @@ public function getWorkflowConditions(Model $model, $conditions = array()) { * @param Model $model Model using this behavior * @param string $type Type of find operation (all / first / count / neighbors / list / threaded) * @param array $query Option fields (conditions / fields / joins / limit / offset / order / page / group / callbacks) + * @param bool $useCommentCreatable コメントの作成権限でもチェックするかどうか * @return array Conditions data + * @SuppressWarnings(PHPMD.BooleanArgumentFlag) */ - public function getWorkflowContents(Model $model, $type, $query = array()) { + public function getWorkflowContents( + Model $model, + $type, + $query = array(), + $useCommentCreatable = false + ) { $query = Hash::merge(array( 'recursive' => -1, - 'conditions' => $this->getWorkflowConditions($model) + 'conditions' => $this->getWorkflowConditions($model, [], $useCommentCreatable) ), $query); return $model->find($type, $query); @@ -384,7 +398,8 @@ public function canEditWorkflowContent(Model $model, $data) { * @return bool true:削除可、false:削除不可 */ public function canDeleteWorkflowContent(Model $model, $data) { - if (! $this->canEditWorkflowContent($model, $data)) { + //Model側で継承している場合、そのcanEditWorkflowContentが実行されるように、$thisではなく、$modelで呼び出す。 + if (! $model->canEditWorkflowContent($data)) { return false; } if (Current::permission('content_publishable')) { From 5f024cfc38bee88028587ce9d1309a147324e86b Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Fri, 7 Apr 2023 09:22:17 +0900 Subject: [PATCH 20/26] =?UTF-8?q?test:=20=E3=80=8CWaiting=20for=20a=20runn?= =?UTF-8?q?er=20to=20pick=20up=20this=20job...=E3=80=8D=E3=81=8C=E3=81=A7?= =?UTF-8?q?=E3=81=A6Github=20Action=E3=81=8C=E5=8B=95=E3=81=8B=E3=81=AA?= =?UTF-8?q?=E3=81=84=E3=81=9F=E3=82=81=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, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7cfa881..3b2212b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -15,7 +15,7 @@ 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 @@ -28,7 +28,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' ] @@ -148,7 +148,7 @@ jobs: teardown: name: teardown - runs-on: ubuntu-18.04 + runs-on: ubuntu-latest needs: tests steps: # テスト成功時はこちらのステップが実行される From 7cf37287ff9bd5235231c495fefb356dc1e71885 Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Fri, 7 Apr 2023 09:22:55 +0900 Subject: [PATCH 21/26] =?UTF-8?q?test:=20phpcs=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 --- Model/Behavior/WorkflowBehavior.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Model/Behavior/WorkflowBehavior.php b/Model/Behavior/WorkflowBehavior.php index ac32061..325eeba 100644 --- a/Model/Behavior/WorkflowBehavior.php +++ b/Model/Behavior/WorkflowBehavior.php @@ -236,7 +236,7 @@ public function getWorkflowConditions( Model $model, $conditions = array(), $useCommentCreatable = false - ) { + ) { if (Current::permission('content_editable')) { $activeConditions = array(); $latestConditons = array( From 11504b7641c452389fa91ec3f38161255e8a9c2f Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Fri, 7 Apr 2023 09:30:13 +0900 Subject: [PATCH 22/26] =?UTF-8?q?test:=20github=20action=E3=81=A7=E9=80=94?= =?UTF-8?q?=E4=B8=AD=E3=81=A7=E3=82=A8=E3=83=A9=E3=83=BC=E3=81=AB=E3=81=AA?= =?UTF-8?q?=E3=81=A3=E3=81=A6=E3=82=82=E5=BE=8C=E7=B6=9A=E3=81=AB=E9=80=B2?= =?UTF-8?q?=E3=82=80=E3=82=88=E3=81=86=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 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3b2212b..7ca9b19 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -92,37 +92,44 @@ 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 + if: success() env: COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} COVERALLS_FLAG_NAME: ${{ matrix.php }} From a26177fb494a5e08386eebb96412a87695778331 Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Fri, 7 Apr 2023 09:36:11 +0900 Subject: [PATCH 23/26] =?UTF-8?q?test:=20github=20action=E3=81=A7=E9=80=94?= =?UTF-8?q?=E4=B8=AD=E3=81=A7=E3=82=A8=E3=83=A9=E3=83=BC=E3=81=AB=E3=81=AA?= =?UTF-8?q?=E3=81=A3=E3=81=A6=E3=82=82=E5=BE=8C=E7=B6=9A=E3=81=AB=E9=80=B2?= =?UTF-8?q?=E3=82=80=E3=82=88=E3=81=86=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 7ca9b19..77f9121 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -139,6 +139,7 @@ jobs: 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 From ce0258bec443361efa6973843cea58eab5b5c4f9 Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Fri, 7 Apr 2023 09:38:03 +0900 Subject: [PATCH 24/26] =?UTF-8?q?test:=20phpmd=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 --- Model/Behavior/WorkflowBehavior.php | 1 + 1 file changed, 1 insertion(+) diff --git a/Model/Behavior/WorkflowBehavior.php b/Model/Behavior/WorkflowBehavior.php index 325eeba..5d55d44 100644 --- a/Model/Behavior/WorkflowBehavior.php +++ b/Model/Behavior/WorkflowBehavior.php @@ -18,6 +18,7 @@ * * @author Shohei Nakajima * @package NetCommons\Workflow\Model\Befavior + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) */ class WorkflowBehavior extends ModelBehavior { From bee00507edbb79455eec2c2bf52489393fab4dc6 Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Fri, 6 Oct 2023 13:51:14 +0900 Subject: [PATCH 25/26] =?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 | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 77f9121..6da4321 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -3,12 +3,10 @@ on: branches: - main - master - - availability pull_request: branches: - main - master - - availability name: tests @@ -19,6 +17,7 @@ jobs: 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 @@ -128,15 +127,14 @@ jobs: docker-compose exec -T nc3app bash /opt/scripts/phpunit.sh sudo -s chmod a+w -R ${NC3_BUILD_DIR}/build - - name: push coveralls - if: success() - 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() @@ -147,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 @@ -161,8 +159,8 @@ jobs: 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 056151f464036b095264103f6dc7ce80dbf96ccc Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Tue, 10 Oct 2023 01:16:27 +0900 Subject: [PATCH 26/26] 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