diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9727716..584725e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,29 +1,32 @@ -name: Tests - -on: - push: - -jobs: - setup: - runs-on: ubuntu-latest - name: Pest on PHP ${{ matrix.php }} - strategy: - matrix: - php: ['8.2'] - - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - extensions: oauth - coverage: none - php-version: ${{ matrix.php }} - - - name: Install Composer dependencies - uses: ramsey/composer-install@v1 - - - name: Test php code - run: composer test:unit +name: Tests + +on: + push: + +jobs: + setup: + runs-on: ubuntu-latest + name: Pest on PHP ${{ matrix.php }} - Testbench ${{ matrix.testbench }} + strategy: + matrix: + php: ['8.2'] + testbench: [7.*, 8.*] + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + extensions: oauth + coverage: none + php-version: ${{ matrix.php }} + + - name: Install Composer dependencies + run: | + composer require "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update + composer update --prefer-dist --no-interaction + + - name: Test php code + run: composer test:unit diff --git a/composer.json b/composer.json index 8f7d676..af4961d 100644 --- a/composer.json +++ b/composer.json @@ -8,7 +8,7 @@ "azuyalabs/yasumi": "^2.5" }, "require-dev": { - "orchestra/testbench": "^7.18", + "orchestra/testbench": "^7.18|^8.0", "pestphp/pest": "^1.22.3", "pestphp/pest-plugin-parallel": "^1.2", "worksome/coding-style": "^2.3" @@ -50,5 +50,7 @@ "Worksome\\UkTaxAllowance\\UkTaxAllowanceServiceProvider" ] } - } + }, + "minimum-stability": "dev", + "prefer-stable": true }