diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..fc25f18 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,71 @@ +name: Tests + +on: + push: + branches: + - main + + pull_request: + types: [opened, synchronize, reopened] + +jobs: + test: + runs-on: ubuntu-latest + if: "!contains(github.event.head_commit.message, 'ci skip')" + strategy: + fail-fast: false + matrix: + php: [ 7.3, 7.4, 8.0, 8.1 ] + laravel: [ 7.*, 8.*, 9.* ] + dependency-version: [ prefer-lowest, prefer-stable ] + include: + - laravel: 7.* + testbench: 5.* + + - laravel: 8.* + testbench: 6.* + + - laravel: 9.* + testbench: 7.* + + exclude: + - laravel: 9.* + php: 7.3 + + - laravel: 9.* + php: 7.4 + + - laravel: 7.* + php: 8.1 + + - laravel: 8.* + php: 8.1 + dependency-version: prefer-lowest + + name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Cache dependencies + uses: actions/cache@v2 + with: + path: ~/.composer/cache/files + key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} + + - 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 + coverage: none + + - name: Install dependencies + run: | + composer self-update + composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update + composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction + + - name: Execute tests + run: vendor/bin/phpunit \ No newline at end of file diff --git a/.styleci.yml b/.styleci.yml new file mode 100644 index 0000000..9a4d524 --- /dev/null +++ b/.styleci.yml @@ -0,0 +1,11 @@ +preset: laravel + +disabled: + - concat_without_spaces + - not_operator_with_successor_space + - cast_spaces + - trailing_comma_in_multiline_array + - heredoc_to_nowdoc + - phpdoc_summary + +risky: false \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index b64a7ea..0000000 --- a/.travis.yml +++ /dev/null @@ -1,54 +0,0 @@ -language: php - -cache: - directories: - - $HOME/.composer/cache/files - -matrix: - include: - - php: 7.2 - env: LARAVEL='6.*' TESTBENCH='4.*' COMPOSER_FLAGS='--prefer-lowest' - - php: 7.2 - env: LARAVEL='6.*' TESTBENCH='4.*' COMPOSER_FLAGS='--prefer-stable' - - php: 7.3 - env: LARAVEL='6.*' TESTBENCH='4.*' COMPOSER_FLAGS='--prefer-lowest' - - php: 7.3 - env: LARAVEL='6.*' TESTBENCH='4.*' COMPOSER_FLAGS='--prefer-stable' - - php: 7.4 - env: LARAVEL='6.*' TESTBENCH='4.*' COMPOSER_FLAGS='--prefer-lowest' - - php: 7.4 - env: LARAVEL='6.*' TESTBENCH='4.*' COMPOSER_FLAGS='--prefer-stable' - - - php: 7.2 - env: LARAVEL='7.*' TESTBENCH='5.*' COMPOSER_FLAGS='--prefer-lowest' - - php: 7.2 - env: LARAVEL='7.*' TESTBENCH='5.*' COMPOSER_FLAGS='--prefer-stable' - - php: 7.3 - env: LARAVEL='7.*' TESTBENCH='5.*' COMPOSER_FLAGS='--prefer-lowest' - - php: 7.3 - env: LARAVEL='7.*' TESTBENCH='5.*' COMPOSER_FLAGS='--prefer-stable' - - php: 7.4 - env: LARAVEL='7.*' TESTBENCH='5.*' COMPOSER_FLAGS='--prefer-lowest' - - php: 7.4 - env: LARAVEL='7.*' TESTBENCH='5.*' COMPOSER_FLAGS='--prefer-stable' - - - - php: 7.3 - env: LARAVEL='8.*' TESTBENCH='6.*' COMPOSER_FLAGS='--prefer-lowest' - - php: 7.3 - env: LARAVEL='8.*' TESTBENCH='6.*' COMPOSER_FLAGS='--prefer-stable' - - php: 7.4 - env: LARAVEL='8.*' TESTBENCH='6.*' COMPOSER_FLAGS='--prefer-lowest' - - php: 7.4 - env: LARAVEL='8.*' TESTBENCH='6.*' COMPOSER_FLAGS='--prefer-stable' - - -before_install: - - travis_retry composer self-update - - travis_retry composer require --no-update --no-interaction "illuminate/support:${LARAVEL}" "orchestra/testbench:${TESTBENCH}" - -install: - - travis_retry composer update ${COMPOSER_FLAGS} --prefer-dist --no-interaction --no-suggest - -script: - - vendor/bin/phpunit \ No newline at end of file diff --git a/composer.json b/composer.json index a3e36d4..ecf9944 100644 --- a/composer.json +++ b/composer.json @@ -6,18 +6,17 @@ "authors": [ { "name": "Aaron Francis", - "email": "aarondfrancis@gmail.com", - "homepage": "https://aaronfrancis.com" + "email": "aaron@hammerstone.dev", + "homepage": "https://hammerstone.dev" } ], "require": { - "illuminate/support": "^6.2|^7.0|^8.0" + "illuminate/support": "^7.0|^8.0|^9.0" }, "require-dev": { - "orchestra/testbench": "^4.2|^5.0", - "phpunit/phpunit": "^8.4", - "mockery/mockery": "^1.3.2" - + "orchestra/testbench": "^5.0|^6.0|^7.0", + "mockery/mockery": "^1.3.3", + "phpunit/phpunit": "^8.5.23|^9.5" }, "autoload": { "psr-4": {