diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..ba38486 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,32 @@ +name: CI +on: + - push + - pull_request +jobs: + build: + strategy: + matrix: + dependencies: + - highest + - lowest + php-versions: + - 7.3 + - 7.4 + - 8.0 + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Setup PHP, with composer and extensions + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-versions }} + + - name: Install dependencies with Composer + uses: ramsey/composer-install@v1 + with: + dependency-versions: ${{ matrix.dependencies }} + + - name: Run unit tests + run: vendor/bin/phpunit diff --git a/.gitignore b/.gitignore index a0f22fe..0794651 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ /vendor/ composer.lock -infection.log .phpunit.result.cache diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 7121b52..0000000 --- a/.travis.yml +++ /dev/null @@ -1,22 +0,0 @@ -cache: - directories: - - $HOME/.composer/cache/files - -language: php - -php: - - 7.2 - - 7.3 - - 7.4 - -env: - - DEPS=lowest - - DEPS=latest - -before_script: - - phpenv config-rm xdebug.ini - - if [[ $DEPS == 'lowest' ]]; then composer update --prefer-stable --no-interaction --prefer-lowest ; fi - - if [[ $DEPS == 'latest' ]]; then composer update --prefer-stable --no-interaction ; fi - -script: - - ./vendor/bin/phpunit diff --git a/composer.json b/composer.json index f2807e1..15db6bf 100644 --- a/composer.json +++ b/composer.json @@ -12,7 +12,7 @@ "psr-11" ], "require": { - "php": "^7.2", + "php": "^7.3 || ^8.0", "maximebf/debugbar": "^1.4", "psr/http-server-handler": "^1.0", "psr/http-server-middleware": "^1.0", @@ -22,14 +22,13 @@ "psr/http-factory-implementation": "^1.0" }, "require-dev": { - "phpunit/phpunit": "^8.5.4 || ^9.1.4", - "mikey179/vfsStream": "^1.6.8", + "phpunit/phpunit": "^9.1.4", + "mikey179/vfsstream": "^1.6.8", "slim/slim": "^3.0", "mezzio/mezzio": "^3.0", "mezzio/mezzio-fastroute": "^3.0.1", "laminas/laminas-servicemanager": "^3.3.2", - "laminas/laminas-diactoros": "^2.0", - "infection/infection": "^0.13.3" + "laminas/laminas-diactoros": "^2.0" }, "autoload": { "psr-4": { diff --git a/infection.json.dist b/infection.json.dist deleted file mode 100644 index 60a2a84..0000000 --- a/infection.json.dist +++ /dev/null @@ -1,14 +0,0 @@ -{ - "timeout": 10, - "source": { - "directories": [ - "src" - ] - }, - "logs": { - "text": "infection.log" - }, - "mutators": { - "@default": true - } -} \ No newline at end of file