From e26931b53839698b0484fff1cef671e5d965978d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20B=C3=B6ttger?= Date: Fri, 24 Mar 2023 22:24:45 +0100 Subject: [PATCH 01/11] #151 use composer to fetch csl locales and styles --- composer.json | 6 ++-- install.sh | 9 ------ .../humans/bugfix-github-143.txt | 2 +- .../humans/bugfix-github-145.txt | 28 +++++++++---------- 4 files changed, 17 insertions(+), 28 deletions(-) delete mode 100755 install.sh diff --git a/composer.json b/composer.json index 34c0c6e0..b9dbae69 100644 --- a/composer.json +++ b/composer.json @@ -27,6 +27,8 @@ } }, "require": { + "citation-style-language/styles": "v0.0.192", + "citation-style-language/locales": "v0.0.5", "seboettg/collection": ">=v3.1.0", "myclabs/php-enum": "^1.8", "ext-simplexml": "*", @@ -46,14 +48,10 @@ }, "scripts": { "post-install-cmd": [ - "./install.sh styles", - "./install.sh locales", "@compile-test-cases", "chmod +x vendor/bin/phpunit" ], "post-update-cmd": [ - "./install.sh styles", - "./install.sh locales", "@compile-test-cases", "chmod +x vendor/bin/phpunit" ], diff --git a/install.sh b/install.sh deleted file mode 100755 index a1bea7b8..00000000 --- a/install.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -if [ -d ./vendor/citation-style-language/$1 ] - then - cd ./vendor/citation-style-language/$1 - git pull origin master - else - git clone --branch=master https://github.com/citation-style-language/$1.git vendor/citation-style-language/$1 -fi \ No newline at end of file diff --git a/tests/fixtures/basic-tests/processor-tests/humans/bugfix-github-143.txt b/tests/fixtures/basic-tests/processor-tests/humans/bugfix-github-143.txt index 4535eb8e..970195dc 100644 --- a/tests/fixtures/basic-tests/processor-tests/humans/bugfix-github-143.txt +++ b/tests/fixtures/basic-tests/processor-tests/humans/bugfix-github-143.txt @@ -1249,8 +1249,8 @@ bibliography "given": "John" } ], - "title": "こんにちは世界", "id": "ITEM-2", + "title": "こんにちは世界", "type": "book" } ] diff --git a/tests/fixtures/basic-tests/processor-tests/humans/bugfix-github-145.txt b/tests/fixtures/basic-tests/processor-tests/humans/bugfix-github-145.txt index 5a9cc310..ac401ef9 100644 --- a/tests/fixtures/basic-tests/processor-tests/humans/bugfix-github-145.txt +++ b/tests/fixtures/basic-tests/processor-tests/humans/bugfix-github-145.txt @@ -1246,56 +1246,56 @@ bibliography "author": [ { "family": "First", - "given": "James" + "given": "James" }, { "family": "Second", - "given": "Jay" + "given": "Jay" }, { "family": "Third", - "given": "John" + "given": "John" }, { "family": "Fourth", - "given": "Jack" + "given": "Jack" }, { "family": "Fifth", - "given": "Jacob" + "given": "Jacob" }, { "family": "Sixth", - "given": "Joseph" + "given": "Joseph" }, { "family": "Seventh", - "given": "Julian" + "given": "Julian" }, { "family": "Eighth", - "given": "Jayden" + "given": "Jayden" }, { "family": "Ninth", - "given": "Jackson" + "given": "Jackson" }, { "family": "Tenth", - "given": "Jasper" + "given": "Jasper" }, { "family": "Eleventh", - "given": "Jonathan" + "given": "Jonathan" }, { "family": "Twelfth", - "given": "Jeremiah" + "given": "Jeremiah" } ], "id": "ITEM-1", - "type": "book", - "title": "Test" + "title": "Test", + "type": "book" } ] <<===== INPUT =====<< From 037924a954bd740fb5b888100904da2e45738e9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20B=C3=B6ttger?= Date: Fri, 24 Mar 2023 22:28:55 +0100 Subject: [PATCH 02/11] #151 use asterisk wildcard for csl styles and locales version --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index b9dbae69..9374d2e9 100644 --- a/composer.json +++ b/composer.json @@ -27,8 +27,8 @@ } }, "require": { - "citation-style-language/styles": "v0.0.192", - "citation-style-language/locales": "v0.0.5", + "citation-style-language/styles": "v0.0.*", + "citation-style-language/locales": "v0.0.*", "seboettg/collection": ">=v3.1.0", "myclabs/php-enum": "^1.8", "ext-simplexml": "*", From e8cfd24d16292a68b0cb5955b9a89380122abc51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20B=C3=B6ttger?= Date: Fri, 24 Mar 2023 22:41:02 +0100 Subject: [PATCH 03/11] ci pipeline --- .github/workflows/ci-coverage.yml | 22 ++++++++++++++++++++++ .github/workflows/ci.yml | 18 ++++++++++++++++++ .scrutinizer.yml | 22 ---------------------- 3 files changed, 40 insertions(+), 22 deletions(-) create mode 100644 .github/workflows/ci-coverage.yml create mode 100644 .github/workflows/ci.yml delete mode 100644 .scrutinizer.yml diff --git a/.github/workflows/ci-coverage.yml b/.github/workflows/ci-coverage.yml new file mode 100644 index 00000000..4f7290d5 --- /dev/null +++ b/.github/workflows/ci-coverage.yml @@ -0,0 +1,22 @@ +name: CI + +on: [push] + +jobs: + build-test: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - uses: php-actions/composer@v6 + - name: PHPUnit Tests + uses: php-actions/phpunit@master + with: + bootstrap: tests/bootstrap.php + configuration: phpunit.xml + php_version: "8.0" + php_extensions: xdebug + args: --coverage-clover + env: + XDEBUG_MODE: coverage + diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..6987f356 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,18 @@ +name: CI + +on: [push] + +jobs: + build-test: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - uses: php-actions/composer@v6 + - name: PHPUnit Tests + uses: php-actions/phpunit@v8.5 + with: + bootstrap: tests/bootstrap.php + configuration: phpunit.xml + php_version: "8.0" + diff --git a/.scrutinizer.yml b/.scrutinizer.yml deleted file mode 100644 index ba3b9e87..00000000 --- a/.scrutinizer.yml +++ /dev/null @@ -1,22 +0,0 @@ -filter: - excluded_paths: - - 'tests/*' -build: - tests: - override: - - command: 'mkdir -p build/logs' - - command: 'php vendor/bin/phpunit --coverage-clover=build/logs/clover.xml' - coverage: - file: 'build/logs/clover.xml' - format: 'clover' - nodes: - tests: true - analysis: - tests: - override: - - command: phpcs-run ./ - use_website_config: false - - php-scrutinizer-run -tools: - php_cs_fixer: - config: { level: psr2 } # or psr1 if you would just like to get fixes for PSR1 \ No newline at end of file From 0685226eb1ae806c695c6586f581d3b7e6c47f03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20B=C3=B6ttger?= Date: Fri, 24 Mar 2023 22:46:31 +0100 Subject: [PATCH 04/11] ci pipeline --- .github/workflows/ci-coverage.yml | 2 +- .github/workflows/ci.yml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-coverage.yml b/.github/workflows/ci-coverage.yml index 4f7290d5..fe04eb36 100644 --- a/.github/workflows/ci-coverage.yml +++ b/.github/workflows/ci-coverage.yml @@ -1,4 +1,4 @@ -name: CI +name: CI-coverage on: [push] diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6987f356..96004c9a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,9 +9,11 @@ jobs: steps: - uses: actions/checkout@v3 - uses: php-actions/composer@v6 + - uses: shivammathur/setup-php@master - name: PHPUnit Tests uses: php-actions/phpunit@v8.5 with: + extension-csv: intl bootstrap: tests/bootstrap.php configuration: phpunit.xml php_version: "8.0" From a604dfb65942ef0d6122519aef3b15dededc4e5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20B=C3=B6ttger?= Date: Fri, 24 Mar 2023 22:47:16 +0100 Subject: [PATCH 05/11] ci pipeline --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 96004c9a..45c7dd76 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: - uses: php-actions/composer@v6 - uses: shivammathur/setup-php@master - name: PHPUnit Tests - uses: php-actions/phpunit@v8.5 + uses: php-actions/phpunit@8.5 with: extension-csv: intl bootstrap: tests/bootstrap.php From f88fd391b96e1102965f275402ced9eac94d5d70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20B=C3=B6ttger?= Date: Fri, 24 Mar 2023 22:48:22 +0100 Subject: [PATCH 06/11] ci pipeline --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 45c7dd76..3cb36a20 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: - uses: php-actions/composer@v6 - uses: shivammathur/setup-php@master - name: PHPUnit Tests - uses: php-actions/phpunit@8.5 + uses: php-actions/phpunit with: extension-csv: intl bootstrap: tests/bootstrap.php From 7dc909f08b4538e330fb44900c85e6bad54413d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20B=C3=B6ttger?= Date: Fri, 24 Mar 2023 22:50:27 +0100 Subject: [PATCH 07/11] ci pipeline --- .github/workflows/ci-coverage.yml | 22 ---------------------- .github/workflows/ci.yml | 2 ++ 2 files changed, 2 insertions(+), 22 deletions(-) delete mode 100644 .github/workflows/ci-coverage.yml diff --git a/.github/workflows/ci-coverage.yml b/.github/workflows/ci-coverage.yml deleted file mode 100644 index fe04eb36..00000000 --- a/.github/workflows/ci-coverage.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: CI-coverage - -on: [push] - -jobs: - build-test: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - uses: php-actions/composer@v6 - - name: PHPUnit Tests - uses: php-actions/phpunit@master - with: - bootstrap: tests/bootstrap.php - configuration: phpunit.xml - php_version: "8.0" - php_extensions: xdebug - args: --coverage-clover - env: - XDEBUG_MODE: coverage - diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3cb36a20..0b75b0fc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,6 +9,8 @@ jobs: steps: - uses: actions/checkout@v3 - uses: php-actions/composer@v6 + - name: Install dependencies + run: composer install --prefer-dist --no-progress --no-suggest - uses: shivammathur/setup-php@master - name: PHPUnit Tests uses: php-actions/phpunit From 636593267af128505a09158c34807bcadbf7a31d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20B=C3=B6ttger?= Date: Fri, 24 Mar 2023 23:05:43 +0100 Subject: [PATCH 08/11] ci pipeline --- .circleci/config.yml | 46 ++++++++++++++++++++++++++++++ .github/workflows/ci.yml | 22 -------------- .github/workflows/php.yml.template | 20 ------------- 3 files changed, 46 insertions(+), 42 deletions(-) create mode 100644 .circleci/config.yml delete mode 100644 .github/workflows/ci.yml delete mode 100644 .github/workflows/php.yml.template diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 00000000..aff02609 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,46 @@ +# PHP CircleCI 2.0 configuration file +# See: https://circleci.com/docs/2.0/language-php/ +version: 2 + +# Define a job to be invoked later in a workflow. +# See: https://circleci.com/docs/2.0/configuration-reference/#jobs +jobs: + build: + # Specify the execution environment. You can specify an image from Dockerhub or use one of our Convenience Images from CircleCI's Developer Hub. + # See: https://circleci.com/docs/2.0/configuration-reference/#docker-machine-macos-windows-executor + docker: + # Specify the version you desire here + - image: circleci/php:7.1-node-browsers + + # Specify service dependencies here if necessary + # CircleCI maintains a library of pre-built images + # documented at https://circleci.com/docs/2.0/circleci-images/ + # Using the RAM variation mitigates I/O contention + # for database intensive operations. + # - image: circleci/mysql:5.7-ram + # + # - image: redis:2.8.19 + + # Add steps to the job + # See: https://circleci.com/docs/2.0/configuration-reference/#steps + steps: + - checkout + + - run: sudo apt update # PHP CircleCI 2.0 Configuration File# PHP CircleCI 2.0 Configuration File sudo apt install zlib1g-dev libsqlite3-dev + - run: sudo docker-php-ext-install zip + - run: sudo apt-get install -y libicu-dev && docker-php-ext-configure intl && docker-php-ext-install intl + # Download and cache dependencies + - restore_cache: + keys: + # "composer.lock" can be used if it is committed to the repo + - v1-dependencies-{{ checksum "composer.json" }} + # fallback to using the latest cache if no exact match is found + - v1-dependencies- + + - run: composer install -n --prefer-dist + + - save_cache: + key: v1-dependencies-{{ checksum "composer.json" }} + paths: + - ./vendor + - run: composer test \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 0b75b0fc..00000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: CI - -on: [push] - -jobs: - build-test: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - uses: php-actions/composer@v6 - - name: Install dependencies - run: composer install --prefer-dist --no-progress --no-suggest - - uses: shivammathur/setup-php@master - - name: PHPUnit Tests - uses: php-actions/phpunit - with: - extension-csv: intl - bootstrap: tests/bootstrap.php - configuration: phpunit.xml - php_version: "8.0" - diff --git a/.github/workflows/php.yml.template b/.github/workflows/php.yml.template deleted file mode 100644 index 348ca66c..00000000 --- a/.github/workflows/php.yml.template +++ /dev/null @@ -1,20 +0,0 @@ -name: PHP Composer - -on: [push] - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v1 - - - name: Install dependencies - run: composer install --prefer-dist --no-progress --no-suggest - - # Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit" - # Docs: https://getcomposer.org/doc/articles/scripts.md - - - name: Run test suite - run: composer run-script test From 66c4bb033bc7b65032d500d995b6fa642bfbffdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20B=C3=B6ttger?= Date: Fri, 24 Mar 2023 23:07:37 +0100 Subject: [PATCH 09/11] ci pipeline --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index aff02609..56dc1a6a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -28,7 +28,7 @@ jobs: - run: sudo apt update # PHP CircleCI 2.0 Configuration File# PHP CircleCI 2.0 Configuration File sudo apt install zlib1g-dev libsqlite3-dev - run: sudo docker-php-ext-install zip - - run: sudo apt-get install -y libicu-dev && docker-php-ext-configure intl && docker-php-ext-install intl + - run: sudo docker-php-ext-install intl # Download and cache dependencies - restore_cache: keys: From 349665e88a33a1cf24e279b69ed5fbc8e84f7913 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20B=C3=B6ttger?= Date: Fri, 24 Mar 2023 23:10:36 +0100 Subject: [PATCH 10/11] Updated config.yml --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 56dc1a6a..a1050277 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -10,7 +10,7 @@ jobs: # See: https://circleci.com/docs/2.0/configuration-reference/#docker-machine-macos-windows-executor docker: # Specify the version you desire here - - image: circleci/php:7.1-node-browsers + - image: circleci/php:8.0-node-browsers # Specify service dependencies here if necessary # CircleCI maintains a library of pre-built images From e59c7d73bfb2c3d72f3c66d6b75a82bcd55dd8d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20B=C3=B6ttger?= Date: Fri, 24 Mar 2023 23:13:41 +0100 Subject: [PATCH 11/11] ci pipeline --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index a1050277..70126915 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -10,7 +10,7 @@ jobs: # See: https://circleci.com/docs/2.0/configuration-reference/#docker-machine-macos-windows-executor docker: # Specify the version you desire here - - image: circleci/php:8.0-node-browsers + - image: cimg/php:8.0.28 # Specify service dependencies here if necessary # CircleCI maintains a library of pre-built images