diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 26bca81..26e1e90 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -1,54 +1,66 @@ name: run-tests -on: [pull_request] +on: + - pull_request jobs: - test: - if: "!contains(github.event.commits[0].message, '[skip ci]')" - runs-on: ubuntu-latest - strategy: - fail-fast: true - matrix: - php: [8.0, 8.1] - laravel: [9, 10.0] - include: - - laravel: 10.0 - testbench: 8.* - - laravel: 9 - testbench: 7.* - name: PHP ${{ matrix.php }} - LARAVEL ${{ matrix.laravel }} - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Decrypt services-account.json - run: | - gpg --quiet --batch --yes --decrypt --passphrase="$GOOGLE_SERVICES_SECRET" \ - --output $GITHUB_WORKSPACE/tests/fixtures/service-account.json $GITHUB_WORKSPACE/tests/fixtures/service-account.json.gpg - env: - GOOGLE_SERVICES_SECRET: ${{ secrets.GOOGLE_SERVICES_SECRET }} - - - name: Cache dependencies - uses: actions/cache@v1 - 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 require "illuminate/console:${{ matrix.laravel }}" "illuminate/filesystem:${{ matrix.laravel }}" "illuminate/support:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update - composer update --prefer-dist --no-interaction --no-suggest - - - name: Run Unit Tests - run: vendor/bin/phpunit --testsuite Unit - - - if: matrix.laravel != '7' - name: Run Feature Tests - run: vendor/bin/phpunit --testsuite Feature + test: + if: "!contains(github.event.commits[0].message, '[skip ci]')" + + runs-on: ubuntu-latest + + strategy: + fail-fast: true + matrix: + php: [8.0, 8.1, '8.2'] + laravel: [9, 10.0, '11'] + include: + - laravel: 10.0 + testbench: 8.* + - laravel: 9 + testbench: 7.* + - laravel: '11.0' + testbench: 9.* + exclude: + - laravel: '11' + php: 8.0 + - laravel: '11' + php: 8.1 + + name: PHP ${{ matrix.php }} - LARAVEL ${{ matrix.laravel }} + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Decrypt services-account.json + run: | + gpg --quiet --batch --yes --decrypt --passphrase="$GOOGLE_SERVICES_SECRET" \ + --output $GITHUB_WORKSPACE/tests/fixtures/service-account.json $GITHUB_WORKSPACE/tests/fixtures/service-account.json.gpg + env: + GOOGLE_SERVICES_SECRET: ${{ secrets.GOOGLE_SERVICES_SECRET }} + + - name: Cache dependencies + uses: actions/cache@v1 + 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 require "illuminate/console:${{ matrix.laravel }}" "illuminate/filesystem:${{ matrix.laravel }}" "illuminate/support:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update + composer update --prefer-dist --no-interaction --no-suggest + + - name: Run Unit Tests + run: vendor/bin/phpunit --testsuite Unit + + - if: "matrix.laravel != '7'" + name: Run Feature Tests + run: vendor/bin/phpunit --testsuite Feature diff --git a/composer.json b/composer.json index 99fcb09..4d59395 100644 --- a/composer.json +++ b/composer.json @@ -12,13 +12,13 @@ ], "require": { "google/apiclient": "^2.1", - "illuminate/console": "~5.8.0|^6.0|^7.0|^8.0|^v9.0|^10.0", - "illuminate/filesystem": "~5.8.0|^6.0|^7.0|^8.0|^v9.0|^10.0", - "illuminate/support": "~5.8.0|^6.0|^7.0|^8.0|^v9.0|^10.0" + "illuminate/console": "~5.8.0|^6.0|^7.0|^8.0|^v9.0|^10.0|^11.0", + "illuminate/filesystem": "~5.8.0|^6.0|^7.0|^8.0|^v9.0|^10.0|^11.0", + "illuminate/support": "~5.8.0|^6.0|^7.0|^8.0|^v9.0|^10.0|^11.0" }, "require-dev": { "friendsofphp/php-cs-fixer": "^3.0", - "orchestra/testbench": "^7.0|^8.0" + "orchestra/testbench": "^7.0|^8.0|^9.0" }, "autoload": { "psr-4": {