diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 9daf54b..18440b7 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -1,57 +1,54 @@ name: run-tests on: - push: - branches: [master] - pull_request: - branches: [master] + push: + pull_request: jobs: - test: - runs-on: ${{ matrix.os }} - strategy: - fail-fast: true - matrix: - os: [ubuntu-latest] - php: [8.2] - laravel: [10.*] - stability: [prefer-lowest, prefer-stable] - include: - - laravel: 10.* - testbench: 8.* - - name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }} - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - 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 }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update - composer update --${{ matrix.stability }} --prefer-dist --no-interaction - - - name: Install unoserver and libreoffice - run: | - python -m pip install --upgrade pip - sudo apt update - sudo apt-get install -y libreoffice - sudo pip install unoserver - - - name: List Installed Dependencies - run: composer show -D - - - name: Execute tests - run: composer test + test: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: true + matrix: + os: [ubuntu-latest] + php: [ 8.3, 8.2 ] + laravel: [ '10.*', '11.*' ] + stability: [prefer-lowest, prefer-stable] + include: + - laravel: 11.* + testbench: 9.* + - laravel: 10.* + testbench: 8.* + + name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }} + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - 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 }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update + composer update --${{ matrix.stability }} --prefer-dist --no-interaction + + - name: Install unoserver and libreoffice + run: | + python -m pip install --upgrade pip + sudo apt update + sudo apt-get install -y libreoffice + sudo pip install unoserver + + - name: Execute tests + run: composer test diff --git a/.gitignore b/.gitignore index 039f9e6..8c19c8d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ .phpunit.cache +.phpunit.result.cache composer.lock coverage docs diff --git a/composer.json b/composer.json index 314d042..18c1dbf 100644 --- a/composer.json +++ b/composer.json @@ -17,11 +17,11 @@ "require": { "php": "^8.2", "phpoffice/phpword": "^0.18.2|^1.0", - "symfony/process": "^6.0" + "symfony/process": "^6.0|^7.0" }, "require-dev": { "laravel/pint": "^1.0", - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^10.5|^11.0" }, "autoload": { "psr-4": { diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 104f45a..b697522 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,13 +1,13 @@ - - - - src/ - - + tests + + + src/ + +