diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index 83618fb..f4f4351 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -2,42 +2,52 @@ name: Code coverage on: push: - branches: [ main ] + branches: + - main paths-ignore: - - 'LICENSE' - - 'README.md' + - LICENSE + - README.md jobs: build: runs-on: ${{ matrix.os }} + strategy: fail-fast: true matrix: - os: [ ubuntu-latest ] - php: [ 8.2 ] - laravel: [ 10.* ] - stability: [ prefer-lowest ] + os: [ubuntu-latest] + php: [8.2] + laravel: ['10.*', '11.*'] + stability: [prefer-lowest] include: - laravel: 10.* testbench: 8.* + - laravel: 11.* + testbench: 9.* + steps: - uses: actions/checkout@v2 + - name: Setup PHP uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php }} extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo coverage: xdebug + - name: Setup problem matchers run: | echo "::add-matcher::${{ runner.tool_cache }}/php.json" echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" + - name: Install dependencies run: | composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update composer update --${{ matrix.stability }} --prefer-dist --no-interaction + - name: Run tests run: vendor/bin/phpunit --coverage-clover coverage.xml + - name: Upload uses: codecov/codecov-action@v1 with: diff --git a/.github/workflows/tests-pr.yml b/.github/workflows/tests-pr.yml index 0dcd55c..cbcf9c4 100644 --- a/.github/workflows/tests-pr.yml +++ b/.github/workflows/tests-pr.yml @@ -2,21 +2,23 @@ name: Tests (PR) on: pull_request: - branches: [ main ] + branches: + - main paths-ignore: - - 'LICENSE' - - 'README.md' + - LICENSE + - README.md jobs: run-tests-pr: runs-on: ${{ matrix.os }} + strategy: fail-fast: true matrix: - os: [ ubuntu-latest ] - php: [ 8.3, 8.2, 8.1 ] - laravel: [ 8.*, 9.*, 10.* ] - stability: [ prefer-stable ] + os: [ubuntu-latest] + php: [8.3, 8.2, 8.1] + laravel: ['8.*', '9.*', '10.*', '11.*'] + stability: [prefer-stable] include: - laravel: 10.* testbench: 8.* @@ -24,22 +26,33 @@ jobs: testbench: 7.* - laravel: 8.* testbench: 6.* + - laravel: 11.* + testbench: 9.* + exclude: + - laravel: 11.* + php: 8.1 + name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }} + steps: - name: Checkout code uses: actions/checkout@v2 + - name: Setup PHP uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php }} extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo + - name: Setup problem matchers run: | echo "::add-matcher::${{ runner.tool_cache }}/php.json" echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" + - name: Install dependencies run: | composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update composer update --${{ matrix.stability }} --prefer-dist --no-interaction + - name: Execute tests run: vendor/bin/phpunit diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 58364ce..8057275 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -2,21 +2,23 @@ name: Tests on: push: - branches: [ main ] + branches: + - main paths-ignore: - - 'LICENSE' - - 'README.md' + - LICENSE + - README.md jobs: run-tests: runs-on: ${{ matrix.os }} + strategy: fail-fast: true matrix: - os: [ ubuntu-latest ] - php: [ 8.3, 8.2, 8.1 ] - laravel: [ 10.*, 9.*, 8.* ] - stability: [ prefer-stable ] + os: [ubuntu-latest] + php: [8.3, 8.2, 8.1] + laravel: ['8.*', '9.*', '10.*', '11.*'] + stability: [prefer-stable] include: - laravel: 10.* testbench: 8.* @@ -24,22 +26,33 @@ jobs: testbench: 7.* - laravel: 8.* testbench: 6.* + - laravel: 11.* + testbench: 9.* + exclude: + - laravel: 11.* + php: 8.1 + name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }} + steps: - name: Checkout code uses: actions/checkout@v2 + - name: Setup PHP uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php }} extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo + - name: Setup problem matchers run: | echo "::add-matcher::${{ runner.tool_cache }}/php.json" echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" + - name: Install dependencies run: | composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update composer update --${{ matrix.stability }} --prefer-dist --no-interaction + - name: Execute tests run: vendor/bin/phpunit diff --git a/composer.json b/composer.json index 2f6575e..33e9274 100644 --- a/composer.json +++ b/composer.json @@ -1,67 +1,67 @@ { - "name": "marcreichel/igdb-laravel", - "description": "A Laravel wrapper for version 4 of the IGDB API (Apicalypse) including webhook handling", - "keywords": [ - "laravel", - "api-wrapper", - "igdb", - "igdb-api", - "apicalypse", - "wrapper" - ], - "type": "library", - "minimum-stability": "dev", - "require": { - "php": "^8.1", - "ext-json": "*", - "illuminate/support": "^8.40.0|^9.0|^10.0", - "guzzlehttp/guzzle": "~6.0|~7.0", - "nesbot/carbon": "^2.53.1" - }, - "require-dev": { - "phpunit/phpunit": "^9.5.4 || ^10.0.0", - "orchestra/testbench": "^6.23|^7.0|^8.0", - "nunomaduro/collision": "^5.3|^6.1|^7.0", - "roave/security-advisories": "dev-latest", - "nunomaduro/larastan": "^1.0|^2.0", - "laravel/pint": "^1.13" - }, - "license": "MIT", - "authors": [ - { - "name": "Marc Reichel", - "email": "mail@marcreichel.de" - } - ], - "scripts": { - "pint": "./vendor/bin/pint --test -v", - "test": "./vendor/bin/testbench package:test", - "stan": "./vendor/bin/phpstan analyse -c phpstan.neon", - "stan-2g": "./vendor/bin/phpstan analyse -c phpstan.neon --memory-limit=2G", - "test:coverage": [ - "@putenv XDEBUG_MODE=coverage", - "./vendor/bin/phpunit --coverage-clover=\"build/clover.xml\"" + "name": "marcreichel/igdb-laravel", + "description": "A Laravel wrapper for version 4 of the IGDB API (Apicalypse) including webhook handling", + "keywords": [ + "laravel", + "api-wrapper", + "igdb", + "igdb-api", + "apicalypse", + "wrapper" ], - "test:coverage-html": [ - "@putenv XDEBUG_MODE=coverage", - "./vendor/bin/phpunit --color=always --coverage-html=\"report\"" - ] - }, - "autoload": { - "psr-4": { - "MarcReichel\\IGDBLaravel\\": "src" - } - }, - "autoload-dev": { - "psr-4": { - "MarcReichel\\IGDBLaravel\\Tests\\": "tests" - } - }, - "extra": { - "laravel": { - "providers": [ - "MarcReichel\\IGDBLaravel\\IGDBLaravelServiceProvider" - ] + "type": "library", + "minimum-stability": "dev", + "require": { + "php": "^8.1", + "ext-json": "*", + "illuminate/support": "^8.40.0|^9.0|^10.0|^11.0", + "guzzlehttp/guzzle": "~6.0|~7.0", + "nesbot/carbon": "^2.53.1|^3.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.5.4 || ^10.0.0", + "orchestra/testbench": "^6.23|^7.0|^8.0|^9.0", + "nunomaduro/collision": "^5.3|^6.1|^7.0|^8.0", + "roave/security-advisories": "dev-latest", + "nunomaduro/larastan": "^1.0|^2.0", + "laravel/pint": "^1.13" + }, + "license": "MIT", + "authors": [ + { + "name": "Marc Reichel", + "email": "mail@marcreichel.de" + } + ], + "scripts": { + "pint": "./vendor/bin/pint --test -v", + "test": "./vendor/bin/testbench package:test", + "stan": "./vendor/bin/phpstan analyse -c phpstan.neon", + "stan-2g": "./vendor/bin/phpstan analyse -c phpstan.neon --memory-limit=2G", + "test:coverage": [ + "@putenv XDEBUG_MODE=coverage", + "./vendor/bin/phpunit --coverage-clover=\"build/clover.xml\"" + ], + "test:coverage-html": [ + "@putenv XDEBUG_MODE=coverage", + "./vendor/bin/phpunit --color=always --coverage-html=\"report\"" + ] + }, + "autoload": { + "psr-4": { + "MarcReichel\\IGDBLaravel\\": "src" + } + }, + "autoload-dev": { + "psr-4": { + "MarcReichel\\IGDBLaravel\\Tests\\": "tests" + } + }, + "extra": { + "laravel": { + "providers": [ + "MarcReichel\\IGDBLaravel\\IGDBLaravelServiceProvider" + ] + } } - } }