diff --git a/.codeclimate.yml b/.codeclimate.yml deleted file mode 100644 index a4152bd..0000000 --- a/.codeclimate.yml +++ /dev/null @@ -1,6 +0,0 @@ -languages: - PHP: true - -exclude_paths: - - "test/*" - - "vendor/*" diff --git a/.github/workflows/phpunit.yml b/.github/workflows/phpunit.yml new file mode 100644 index 0000000..d8bcf54 --- /dev/null +++ b/.github/workflows/phpunit.yml @@ -0,0 +1,39 @@ +name: phpunit + +on: + pull_request: {} + release: {} + push: + branches: [ master ] + +jobs: + tests: + name: unit tests + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - uses: php-actions/composer@v6 + with: + version: 2 + + - name: phpunit tests + uses: php-actions/phpunit@v3 + with: + configuration: ./test/phpunit.xml + php_extensions: pcov + + - name: coverage monitor + uses: slavcodev/coverage-monitor-action@1.6.0 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + coverage_path: test/clover.xml + comment_footer: false + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: test/clover.xml + name: github-ci + verbose: true \ No newline at end of file diff --git a/.scrutinizer.yml b/.scrutinizer.yml deleted file mode 100644 index ab6df5c..0000000 --- a/.scrutinizer.yml +++ /dev/null @@ -1,17 +0,0 @@ -filter: - paths: ['src/*'] - -build: - environment: - php: - version: 8.1 - tests: - override: - - php-scrutinizer-run --enable-security-analysis - - command: 'XDEBUG_MODE=coverage ./vendor/bin/phpunit --config test/phpunit.xml --coverage-clover=test/clover.xml' - coverage: - file: 'test/clover.xml' - format: 'clover' - -tools: - external_code_coverage: false \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index de0b963..0000000 --- a/.travis.yml +++ /dev/null @@ -1,11 +0,0 @@ -language: php -php: - - 8.1 - - nightly - -before_script: - - composer self-update - - composer install - -script: - - ./vendor/bin/phpunit --configuration ./test/phpunit.xml diff --git a/README.md b/README.md index 90ba854..4b363af 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,7 @@ # php-hydrator -[![Build Status](https://travis-ci.org/alexpts/php-hydrator.svg?branch=master)](https://travis-ci.org/alexpts/php-hydrator) -[![Code Coverage](https://scrutinizer-ci.com/g/alexpts/php-hydrator/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/alexpts/php-hydrator/?branch=master) -[![Code Climate](https://codeclimate.com/github/alexpts/php-hydrator/badges/gpa.svg)](https://codeclimate.com/github/alexpts/php-hydrator) -[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/alexpts/php-hydrator/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/alexpts/php-hydrator/?branch=master) - +[![phpunit](https://github.com/alexpts/php-hydrator/actions/workflows/phpunit.yml/badge.svg?branch=master)](https://github.com/alexpts/php-hydrator/actions/workflows/phpunit.yml) +[![codecov](https://codecov.io/gh/alexpts/php-hydrator/branch/master/graph/badge.svg?token=14L6IJA5UE)](https://codecov.io/gh/alexpts/php-hydrator) Одни и те же данные нужно представить в разном виде. В коде удобно работать с высокоуровневыми моделями. Но для сохранения этих данных в базу данных, как правило, данные требуется перевести в более простой вид, обычно в ассоциативный массив. Для передачи данных между приложениями используют простые DTO сущности.