diff --git a/.coveralls.yml b/.coveralls.yml deleted file mode 100644 index 6e64999..0000000 --- a/.coveralls.yml +++ /dev/null @@ -1 +0,0 @@ -service_name: travis-ci \ No newline at end of file diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml new file mode 100644 index 0000000..7e95881 --- /dev/null +++ b/.github/workflows/workflow.yml @@ -0,0 +1,51 @@ +name: PHP tests + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + php-tests: + + runs-on: ubuntu-latest + strategy: + matrix: + php-versions: ['7.2', '7.3', '7.4'] + + name: PHP ${{ matrix.php-versions }} tests + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-versions }} + extensions: mbstring, intl + ini-values: post_max_size=256M, short_open_tag=On + coverage: xdebug + tools: php-cs-fixer, phpunit + + - name: Validate composer.json and composer.lock + run: composer validate + + - name: Install dependencies + run: composer install --prefer-dist --no-progress --no-suggest + + - name: Execute PHPUnit tests + run: vendor/bin/phpunit --configuration phpunit.xml --coverage-text + + - name: Upload coverage results to Codeclimate + env: + CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} + run: | + curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter + chmod +x ./cc-test-reporter + ./cc-test-reporter before-build + vendor/bin/phpunit tests --coverage-clover build/logs/clover.xml + ./cc-test-reporter after-build -t clover --exit-code $? + + diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 4d45bed..0000000 --- a/.travis.yml +++ /dev/null @@ -1,23 +0,0 @@ -language: php - -php: - - 7.2 - - 7.3 - - 7.4 - -sudo: false - -branches: - only: - - master - -before_script: - - composer self-update - - composer install - -script: - - mkdir -p build/logs - - vendor/bin/phpunit tests --coverage-clover build/logs/clover.xml - -after_success: - - travis_retry php vendor/bin/php-coveralls \ No newline at end of file diff --git a/README.md b/README.md index 4f5b190..12cbae4 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # **[Laravelium Sitemap](https://laravelium.com) package** -[![License](https://poser.pugx.org/laravelium/sitemap/license)](https://packagist.org/packages/laravelium/sitemap) [![Build Status](https://travis-ci.org/Laravelium/laravel-sitemap.svg?branch=master)](https://travis-ci.org/Laravelium/laravel-sitemap) [![Coverage Status](https://coveralls.io/repos/github/Laravelium/laravel-sitemap/badge.svg?branch=master)](https://coveralls.io/github/Laravelium/laravel-sitemap?branch=master) [![Style Status](https://github.styleci.io/repos/10392044/shield?style=normal&branch=master)](https://github.styleci.io/repos/10392044) [![Latest Stable Version](https://poser.pugx.org/laravelium/sitemap/v/stable)](https://packagist.org/packages/laravelium/sitemap) [![Total Downloads](https://poser.pugx.org/laravelium/sitemap/downloads)](https://packagist.org/packages/laravelium/sitemap) +[![License](https://poser.pugx.org/laravelium/sitemap/license)](https://packagist.org/packages/laravelium/sitemap) [![PHP tests](https://github.com/Laravelium/laravel-sitemap/workflows/PHP%20tests/badge.svg?branch=master)](https://github.com//Laravelium/laravel-sitemap/actions?query=workflow%3A%22PHP+tests%22) [![Maintainability](https://api.codeclimate.com/v1/badges/c7b8c0079addb1217836/maintainability)](https://codeclimate.com/github/Laravelium/laravel-sitemap/maintainability) [![Test Coverage](https://api.codeclimate.com/v1/badges/c7b8c0079addb1217836/test_coverage)](https://codeclimate.com/github/Laravelium/laravel-sitemap/test_coverage) [![Style Status](https://github.styleci.io/repos/10392044/shield?style=normal&branch=master)](https://github.styleci.io/repos/10392044) [![Latest Stable Version](https://poser.pugx.org/laravelium/sitemap/v/stable)](https://packagist.org/packages/laravelium/sitemap) [![Total Downloads](https://poser.pugx.org/laravelium/sitemap/downloads)](https://packagist.org/packages/laravelium/sitemap) *Laravelium Sitemap generator for Laravel.*