diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..89ab407 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,39 @@ +name: Tests + +on: push + +jobs: + run: + runs-on: ubuntu-latest + strategy: + matrix: + php: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4'] + name: PHP ${{ matrix.php }} + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Install PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + extensions: intl + + - name: Cache Composer packages + id: composer-cache + uses: actions/cache@v2 + with: + path: vendor + key: ${{ matrix.php }}-composer + + - name: Composer install + if: steps.composer-cache.outputs.cache-hit != 'true' + run: composer install -n + + - name: Display versions + run: | + php -v + php -i + vendor/bin/phpunit -v + + - run: vendor/bin/phpunit diff --git a/.travis.yml b/.travis.yml deleted file mode 100755 index c7988c1..0000000 --- a/.travis.yml +++ /dev/null @@ -1,12 +0,0 @@ -language: php -php: - - 5.6 - - 7.0 - - 7.1 - - 7.2 - - 7.3 - - 7.4 -install: - - composer install -n -script: - - vendor/bin/phpunit \ No newline at end of file diff --git a/README.md b/README.md index bcbd493..d85c07b 100755 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Lightweight and fast implementation of recurrence rules for PHP (`RRULE` from RFC 5545), to easily calculate recurring/repeating dates and events (such as in a calendar). This library started as a port of [python-dateutil](https://labix.org/python-dateutil). -[![Build Status](https://travis-ci.org/rlanvin/php-rrule.svg?branch=master)](https://travis-ci.org/rlanvin/php-rrule) +[![Build status](https://github.com/rlanvin/php-rrule/workflows/Tests/badge.svg)](https://github.com/rlanvin/php-rrule/actions) [![Latest Stable Version](https://poser.pugx.org/rlanvin/php-rrule/v/stable)](https://packagist.org/packages/rlanvin/php-rrule) [![Total Downloads](https://poser.pugx.org/rlanvin/php-rrule/downloads)](https://packagist.org/packages/rlanvin/php-rrule) diff --git a/composer.json b/composer.json index 35c6dfa..f53c11c 100755 --- a/composer.json +++ b/composer.json @@ -22,7 +22,7 @@ } }, "require-dev": { - "phpunit/phpunit": "^4.8|^5.5|^6.5", + "phpunit/phpunit": "^5.7|^6.5", "phpmd/phpmd" : "@stable" } }