diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 00000000..70126915 --- /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: cimg/php:8.0.28 + + # 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 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/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 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 diff --git a/composer.json b/composer.json index 34c0c6e0..9374d2e9 100644 --- a/composer.json +++ b/composer.json @@ -27,6 +27,8 @@ } }, "require": { + "citation-style-language/styles": "v0.0.*", + "citation-style-language/locales": "v0.0.*", "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 =====<<