diff --git a/.github/workflows/phpunit.yml b/.github/workflows/phpunit.yml new file mode 100644 index 0000000..3334e40 --- /dev/null +++ b/.github/workflows/phpunit.yml @@ -0,0 +1,33 @@ +name: PHP Composer + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Validate composer.json and composer.lock + run: composer validate + + - name: Cache Composer packages + id: composer-cache + uses: actions/cache@v2 + with: + path: vendor + key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} + restore-keys: | + ${{ runner.os }}-php- + + - name: Install dependencies + if: steps.composer-cache.outputs.cache-hit != 'true' + run: composer install --prefer-dist --no-progress --no-suggest + + - name: Run test suite + run: ./vendor/bin/phpunit diff --git a/composer.json b/composer.json index 03b904d..4137f64 100644 --- a/composer.json +++ b/composer.json @@ -14,15 +14,13 @@ "email": "seregazhuk88@gmail.com" } ], - "minimum-stability": "dev", "require": { - "php": ">=5.6", - "guzzlehttp/guzzle": "^6.2" + "php": ">=7.2", + "guzzlehttp/guzzle": "^6.2|^7.0" }, "require-dev": { - "mockery/mockery": "^0.9.5", - "phpunit/phpunit": "~5.7", - "codeclimate/php-test-reporter": "dev-master" + "mockery/mockery": "^1.0", + "phpunit/phpunit": "^9.0" }, "autoload": { "psr-4": { diff --git a/phpunit.xml b/phpunit.xml index f280e4c..be1e966 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -8,7 +8,6 @@ convertWarningsToExceptions="true" processIsolation="false" stopOnFailure="false" - syntaxCheck="false" > @@ -26,4 +25,4 @@ yui="true" highlight="true" lowUpperBound="50" highLowerBound="80"/> - \ No newline at end of file + diff --git a/tests/ApiTest.php b/tests/ApiTest.php index 42ef85b..a303c30 100644 --- a/tests/ApiTest.php +++ b/tests/ApiTest.php @@ -35,7 +35,7 @@ public function it_uses_organization_for_further_requests() /** @test */ public function it_throws_exception_for_wrong_endpoint() { - $this->setExpectedException(WrongEndpoint::class); + $this->expectException(WrongEndpoint::class); $api = $this->makeApi(); $api->test->getAll(); }