From 37a1437d2a808c513906e6e067b8356de742e492 Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Sat, 23 Jan 2021 14:03:10 +0900 Subject: [PATCH 01/14] =?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 61c5a08beb923af435daef1cd9383c93a10e4d31 Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Sat, 23 Jan 2021 14:03:15 +0900 Subject: [PATCH 02/14] 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 f918c50fc200dc584f8eff8a40c4db8f04a6acb8 Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Wed, 4 Aug 2021 13:23:14 +0900 Subject: [PATCH 03/14] =?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 | 14 ++-- phpunit.xml.dist | 4 +- 4 files changed, 142 insertions(+), 54 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 74c5adc..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: - - NETCOMMONS_VERSION=master DB=mysql - -matrix: - allow_failures: - # PHP 7.4 testing is allowed to fail because the GD extension and ZipArchive is not packaged on Travis CI yet. - # See https://travis-ci.community/t/some-extensions-are-missing-in-php-7-4-0-zip-gmp-sodium/6320/9 - - php: 7.4 - -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 8833808..fdc6fce 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,6 @@ -# Quizzes +Quizzes ============== -Quizzes for NetCommons3 - -[![Build Status](https://api.travis-ci.org/NetCommons3/Quizzes.png?branch=master)](https://travis-ci.org/NetCommons3/Quizzes) -[![Coverage Status](https://coveralls.io/repos/NetCommons3/Quizzes/badge.png?branch=master)](https://coveralls.io/r/NetCommons3/Quizzes?branch=master) - -| dependencies | status | -| ------------- | ------ | -| composer.json | [![Dependency Status](https://www.versioneye.com/user/projects/(versioneye_project_ID)/badge.png)](https://www.versioneye.com/user/projects/(573071b919f62a000efc072c)) | - +[![Tests Status](https://github.com/NetCommons3/Quizzes/actions/workflows/tests.yml/badge.svg?branch=master)](https://github.com/NetCommons3/Quizzes/actions/workflows/tests.yml) +[![Coverage Status](https://coveralls.io/repos/NetCommons3/Quizzes/badge.svg?branch=master)](https://coveralls.io/r/NetCommons3/Quizzes?branch=master) +[![Stable Version](https://img.shields.io/packagist/v/netcommons/quizzes.svg?label=stable)](https://packagist.org/packages/netcommons/quizzes) diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 2c79648..dd3d730 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -3,9 +3,6 @@ - - - app/Plugin/Quizzes @@ -23,5 +20,6 @@ + From a9fd96a621cd0c39a74cd28c436d5a3f9b40562b Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Wed, 11 Aug 2021 13:09:01 +0900 Subject: [PATCH 04/14] =?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 af3b9787605ffabe48fba6b45af9d0acd569d5a9 Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Fri, 13 Aug 2021 17:38:34 +0900 Subject: [PATCH 05/14] 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 05e9b7307d1e32479ce8f154e90468974765db39 Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Tue, 9 Nov 2021 12:37:04 +0900 Subject: [PATCH 06/14] =?UTF-8?q?refactor:=20=E4=B8=8D=E8=A6=81=E3=81=AA?= =?UTF-8?q?=E5=87=A6=E7=90=86=E3=82=92=E5=89=8A=E9=99=A4=20=E2=80=BB?= =?UTF-8?q?=E5=88=9D=E6=9C=9F=E8=A8=AD=E8=A8=88=E3=81=A7=E3=81=AF=E3=80=81?= =?UTF-8?q?=E3=83=9A=E3=83=BC=E3=82=B8=E5=90=8D=E3=82=92=E8=87=AA=E7=94=B1?= =?UTF-8?q?=E3=81=AB=E5=A4=89=E6=9B=B4=E3=81=A7=E3=81=8D=E3=82=8B=E8=A8=AD?= =?UTF-8?q?=E8=A8=88=E3=81=A0=E3=81=A3=E3=81=9F=E3=81=8C=E3=80=81=E3=81=9D?= =?UTF-8?q?=E3=81=AE=E4=BB=95=E6=A7=98=E3=81=AF=E7=84=A1=E3=81=8F=E3=81=AA?= =?UTF-8?q?=E3=81=A3=E3=81=9F(=EF=BC=9F)=E3=81=9F=E3=82=81=E4=B8=8D?= =?UTF-8?q?=E8=A6=81=E3=81=AB=E3=81=AA=E3=81=A3=E3=81=9F=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- View/Elements/QuizEdit/EditQuestion/hidden_page_info_set.ctp | 2 -- 1 file changed, 2 deletions(-) diff --git a/View/Elements/QuizEdit/EditQuestion/hidden_page_info_set.ctp b/View/Elements/QuizEdit/EditQuestion/hidden_page_info_set.ctp index 34e040e..ecebfbb 100644 --- a/View/Elements/QuizEdit/EditQuestion/hidden_page_info_set.ctp +++ b/View/Elements/QuizEdit/EditQuestion/hidden_page_info_set.ctp @@ -15,5 +15,3 @@ array('ng-value' => 'page.pageSequence')); echo $this->NetCommonsForm->hidden('QuizPage.{{pageIndex}}.key', array('ng-value' => 'page.key')); - $this->NetCommonsForm->hidden('QuizPage.{{pageIndex}}.page_title', - array('ng-value' => 'page.pageTitle')); From 48349f4c0577fd36396f163e260dbfbf6b19e5c9 Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Tue, 9 Nov 2021 15:54:30 +0900 Subject: [PATCH 07/14] =?UTF-8?q?refactor:=20debug=E3=81=AE=E5=89=8A?= =?UTF-8?q?=E9=99=A4=E6=BC=8F=E3=82=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Controller/QuizEditController.php | 1 - 1 file changed, 1 deletion(-) diff --git a/Controller/QuizEditController.php b/Controller/QuizEditController.php index db634dd..27fd02c 100644 --- a/Controller/QuizEditController.php +++ b/Controller/QuizEditController.php @@ -425,7 +425,6 @@ protected function _getActionUrl($method) { if (Current::isSettingMode()) { $urlArray['q_mode'] = 'setting'; } - $this->log($urlArray, 'debug'); return NetCommonsUrl::actionUrl($urlArray); } From 47d3e12bd5f63fbcf1d1e31dd0e4cd0aefd551ea Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Thu, 3 Feb 2022 18:40:06 +0900 Subject: [PATCH 08/14] =?UTF-8?q?fix:=20DB=E3=81=AB=E7=99=BB=E9=8C=B2?= =?UTF-8?q?=E3=81=95=E3=82=8C=E3=81=A6=E3=81=84=E3=82=8B=E6=97=A5=E6=99=82?= =?UTF-8?q?(GMT)=E3=82=92=E3=81=9D=E3=81=AE=E3=81=BE=E3=81=BE=E5=87=BA?= =?UTF-8?q?=E5=8A=9B=E3=81=97=E3=81=A6=E3=81=84=E3=81=9F=E3=81=9F=E3=82=81?= =?UTF-8?q?=E3=83=80=E3=82=A6=E3=83=B3=E3=83=AD=E3=83=BC=E3=83=89=E3=81=99?= =?UTF-8?q?=E3=82=8B=E3=83=A6=E3=83=BC=E3=82=B6=E3=81=AE=E3=82=BF=E3=82=A4?= =?UTF-8?q?=E3=83=A0=E3=82=BE=E3=83=BC=E3=83=B3=E3=81=AB=E5=A4=89=E6=8F=9B?= =?UTF-8?q?=E3=81=99=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E4=BF=AE=E6=AD=A3?= =?UTF-8?q?=20https://github.com/NetCommons3/NetCommons3/issues/1471?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Model/QuizAnswerSummaryCsv.php | 14 ++++++++++++- .../GetAnswerSummaryCsvTest.php | 20 +++++++++---------- 2 files changed, 23 insertions(+), 11 deletions(-) diff --git a/Model/QuizAnswerSummaryCsv.php b/Model/QuizAnswerSummaryCsv.php index a016288..4471e72 100644 --- a/Model/QuizAnswerSummaryCsv.php +++ b/Model/QuizAnswerSummaryCsv.php @@ -14,6 +14,7 @@ App::uses('QuizzesAppModel', 'Quizzes.Model'); App::uses('QuizAnswerSummary', 'Quizzes.Model'); +App::uses('NetCommonsTime', 'NetCommons.Utility'); /** * Summary for QuizAnswerSummary Model @@ -60,6 +61,13 @@ class QuizAnswerSummaryCsv extends QuizAnswerSummary { public $hasMany = array( ); +/** + * 日時を変換するクラス + * + * @var NetCommonsTime + */ + private $__NetCommonsTime; + /** * Constructor. Binds the model's database table to the object. * @@ -77,6 +85,7 @@ public function __construct($id = false, $table = null, $ds = null) { 'Quiz' => 'Quizzes.Quiz', 'QuizAnswer' => 'Quizzes.QuizAnswer', ]); + $this->__NetCommonsTime = new NetCommonsTime(); } /** @@ -301,7 +310,10 @@ protected function _getRows($quiz, $sampScore, $summary, $answers) { $cols = array(); $cols[] = $this->_getUserName($quiz, $summary); - $cols[] = $summary['QuizAnswerSummaryCsv']['answer_finish_time']; + $cols[] = $this->__NetCommonsTime->dateFormat( + $summary['QuizAnswerSummaryCsv']['answer_finish_time'], + 'Y-m-d H:i:s' + ); $cols[] = $summary['QuizAnswerSummaryCsv']['elapsed_second']; $cols[] = $summary['QuizAnswerSummaryCsv']['answer_number']; $cols[] = $summary['QuizAnswerSummaryCsv']['summary_score']; diff --git a/Test/Case/Model/QuizAnswerSummaryCsv/GetAnswerSummaryCsvTest.php b/Test/Case/Model/QuizAnswerSummaryCsv/GetAnswerSummaryCsvTest.php index fc31f92..ba52fa7 100644 --- a/Test/Case/Model/QuizAnswerSummaryCsv/GetAnswerSummaryCsvTest.php +++ b/Test/Case/Model/QuizAnswerSummaryCsv/GetAnswerSummaryCsvTest.php @@ -118,28 +118,28 @@ public function dataProviderGet() { __d('quizzes', 'Score') ), // header array( - '非会員', '2016-06-10 06:35:02', '10', '1', '0', '40', '', __d('quizzes', 'Ungraded'), + '非会員', '2016-06-10 15:35:02', '10', '1', '0', '40', '', __d('quizzes', 'Ungraded'), ), // data1 array( - '非会員', '2016-06-10 06:36:46', '77', '1', '8', '59', '正解で部分点でお願いします', 8, + '非会員', '2016-06-10 15:36:46', '77', '1', '8', '59', '正解で部分点でお願いします', 8, ), // data2 array( - '非会員', '2016-06-10 06:37:26', '24', '1', '10', '64', '正解で満点でお願いします', 10, + '非会員', '2016-06-10 15:37:26', '24', '1', '10', '64', '正解で満点でお願いします', 10, ), // data3 array( - '非会員', '2016-06-10 06:38:17', '30', '1', '2', '45', '間違い部分点でお願いします', 2, + '非会員', '2016-06-10 15:38:17', '30', '1', '2', '45', '間違い部分点でお願いします', 2, ), // data4 array( - '非会員', '2016-06-10 06:39:14', '35', '1', '0', '40', '間違いで0点でお願いします', 0, + '非会員', '2016-06-10 15:39:14', '35', '1', '0', '40', '間違いで0点でお願いします', 0, ), // data5 array( - 'Editor', '2016-06-10 06:47:11', '27', '1', '0', '40', '未採点のままにしてください', __d('quizzes', 'Ungraded'), + 'Editor', '2016-06-10 15:47:11', '27', '1', '0', '40', '未採点のままにしてください', __d('quizzes', 'Ungraded'), ), // data6 array( - 'Editor', '2016-06-10 06:47:56', '26', '2', '10', '64', '正解満点でお願いします', 10, + 'Editor', '2016-06-10 15:47:56', '26', '2', '10', '64', '正解満点でお願いします', 10, ), // data6 array( - 'Editor', '2016-06-10 06:48:55', '27', '3', '4', '49', '間違い部分点でお願いします', 4, + 'Editor', '2016-06-10 15:48:55', '27', '3', '4', '49', '間違い部分点でお願いします', 4, ), // data6 ); $expect2 = array( @@ -169,7 +169,7 @@ public function dataProviderGet() { __d('quizzes', 'Score') ), // header array( - '非会員', '2016-06-10 06:20:53', '14', '1', '10', '50.0', '新規選択肢1', 10, + '非会員', '2016-06-10 15:20:53', '14', '1', '10', '50.0', '新規選択肢1', 10, ), // data2 ); return array( @@ -179,4 +179,4 @@ public function dataProviderGet() { ); } -} \ No newline at end of file +} From 169396dad23e800c5a9212ecdd08ed90f8804843 Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Fri, 11 Feb 2022 21:17:09 +0900 Subject: [PATCH 09/14] 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 26092a9c30f0bf076e7b87cc21e0cc2e1d7e47a6 Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Sat, 23 Apr 2022 12:56:45 +0900 Subject: [PATCH 10/14] =?UTF-8?q?test:=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 931387a48ce2e73075ca1142129ad3cc28855f66 Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Fri, 24 Feb 2023 16:30:36 +0900 Subject: [PATCH 11/14] =?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 a173ea2570f5f0064b13ef92ca12ac75f068c080 Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Sun, 26 Feb 2023 04:31:57 +0900 Subject: [PATCH 12/14] 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 88568577c353fe7a11c0b5d7d9586ea56cf61268 Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Thu, 5 Oct 2023 22:42:20 +0900 Subject: [PATCH 13/14] =?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 f615a20caff70fff200da76874fba581bac5ab7d Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Mon, 9 Oct 2023 21:49:20 +0900 Subject: [PATCH 14/14] 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