diff --git a/.github/workflows/basic-checks.yml b/.github/workflows/basic-checks.yml index dea0bff..943b0ae 100644 --- a/.github/workflows/basic-checks.yml +++ b/.github/workflows/basic-checks.yml @@ -1,5 +1,5 @@ name: Basic Checks -on: [push, pull_request] +on: [push] jobs: node-docker: diff --git a/.github/workflows/composer-install.yml b/.github/workflows/composer-install.yml new file mode 100644 index 0000000..e4a8566 --- /dev/null +++ b/.github/workflows/composer-install.yml @@ -0,0 +1,40 @@ +name: Test In All PHP Versions + +on: + pull_request: + branches: [master] + +jobs: + phpunit: + name: PHPUnit + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + php-version: + - "7.4" + - "8.0" + - "8.1" + - "8.2" + dependency-versions: + - "lowest" + - "highest" + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-version }} + coverage: none + + - name: Install composer dependencies + uses: ramsey/composer-install@v2 + with: + dependency-versions: ${{ matrix.dependency-versions }} + + - name: Run PHPUnit + run: vendor/bin/phpunit tests diff --git a/.github/workflows/mardown-lint.yml b/.github/workflows/mardown-lint.yml index 681e0da..32bbfcc 100644 --- a/.github/workflows/mardown-lint.yml +++ b/.github/workflows/mardown-lint.yml @@ -1,21 +1,20 @@ name: Markdown Linter -on: [push, pull_request] +on: [push] jobs: phpcs: - name: Lint MD Files - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Lint README - uses: nosborn/github-action-markdown-cli@v1.1.1 - with: - files: README.md - config_file: "./.github/markdown.config.json" - - name: Lint CONTRIBUTING - uses: nosborn/github-action-markdown-cli@v1.1.1 - with: - files: ./.github/CONTRIBUTING.md - config_file: "./.github/markdown.config.json" - + name: Lint MD Files + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Lint README + uses: nosborn/github-action-markdown-cli@v1.1.1 + with: + files: README.md + config_file: "./.github/markdown.config.json" + - name: Lint CONTRIBUTING + uses: nosborn/github-action-markdown-cli@v1.1.1 + with: + files: ./.github/CONTRIBUTING.md + config_file: "./.github/markdown.config.json" diff --git a/.github/workflows/phpcs.yml b/.github/workflows/phpcs.yml index bb36d3d..e9cc6d9 100644 --- a/.github/workflows/phpcs.yml +++ b/.github/workflows/phpcs.yml @@ -1,12 +1,12 @@ name: Codestyle Check -on: [push, pull_request] +on: [push] jobs: phpcs: - name: PHPCS - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: PHPCS check - uses: chekalsky/phpcs-action@v1 \ No newline at end of file + name: PHPCS + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: PHPCS check + uses: chekalsky/phpcs-action@v1 diff --git a/.github/workflows/tests-new-versions.yml b/.github/workflows/tests-new-versions.yml deleted file mode 100644 index 92e3ac6..0000000 --- a/.github/workflows/tests-new-versions.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: Tests -on: [push, pull_request] - -jobs: - test: - runs-on: ${{ matrix.os }} - strategy: - fail-fast: true - matrix: - os: [ubuntu-latest, windows-latest] - php: [8.1] - laravel: [10.*] - stability: [prefer-lowest, prefer-stable] - include: - - laravel: 8.* - - name: PHP${{ matrix.php }} - Laravel${{ 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 - coverage: none - - - 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 }}" --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-old-versions.yml b/.github/workflows/tests-old-versions.yml deleted file mode 100644 index b205c84..0000000 --- a/.github/workflows/tests-old-versions.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: Tests -on: [push, pull_request] - -jobs: - test: - runs-on: ${{ matrix.os }} - strategy: - fail-fast: true - matrix: - os: [ubuntu-latest, windows-latest] - php: [8.0] - laravel: [9.*] - stability: [prefer-lowest, prefer-stable] - include: - - laravel: 8.* - - name: PHP${{ matrix.php }} - Laravel${{ 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 - coverage: none - - - 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 }}" --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 303aa2f..77449e7 100644 --- a/composer.json +++ b/composer.json @@ -17,15 +17,14 @@ ], "require": { "php": "^7.4|^8.0|^8.1", - "illuminate/collections": "^9.0", - "illuminate/contracts": "^9.0", + "illuminate/collections": "^8.0|^9.0|^10.0", + "illuminate/contracts": "^8.0|^9.0|^10.0", "spatie/laravel-package-tools": "^1.4.3" }, "require-dev": { "brianium/paratest": "^6.2", "nunomaduro/collision": "^5.3", "phpunit/phpunit": "^9.3", - "spatie/laravel-ray": "^1.9", "squizlabs/php_codesniffer": "^3.6" }, "autoload": { @@ -55,4 +54,4 @@ }, "minimum-stability": "dev", "prefer-stable": true -} \ No newline at end of file +}