diff --git a/.github/actions/php-laravel-setup/action.yml b/.github/actions/php-laravel-setup/action.yml deleted file mode 100644 index 1a4b366..0000000 --- a/.github/actions/php-laravel-setup/action.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: PHP Laravel setup -description: Setup PHP and install dependencies for selected Laravel versions - -inputs: - php-version: - description: PHP version for the job - required: true - laravel-version: - description: Laravel framework version constraint - required: true - coverage: - description: Coverage driver passed to setup-php - required: false - default: none - -runs: - using: composite - steps: - - name: Set up PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ inputs.php-version }} - coverage: ${{ inputs.coverage }} - tools: composer - - - name: Install Laravel version - shell: bash - env: - LARAVEL_VERSION: ${{ inputs.laravel-version }} - run: composer require "laravel/framework:$LARAVEL_VERSION" -q --no-update - - - name: Install dependencies - shell: bash - run: composer update -W -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist diff --git a/.github/workflows/run-tests-with-coverage.yml b/.github/workflows/run-tests-with-coverage.yml deleted file mode 100644 index a4a4390..0000000 --- a/.github/workflows/run-tests-with-coverage.yml +++ /dev/null @@ -1,75 +0,0 @@ -name: Run tests - -on: - push: - branches: [ "master" ] - pull_request: - branches: [ "master" ] - -env: - FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true" - PHP_LATEST: &php-latest "8.5" - LARAVEL_LATEST: &laravel-latest "13.*" - -jobs: - tests: - runs-on: ubuntu-latest - strategy: - matrix: - php-version: [ "8.4", "8.5" ] - laravel-version: [ "12.*", "13.*" ] - exclude: - - php-version: *php-latest - laravel-version: *laravel-latest - steps: - - name: Checkout - uses: actions/checkout@v6 - - name: Setup - uses: ./.github/actions/php-laravel-setup - with: - php-version: ${{ matrix.php-version }} - laravel-version: ${{ matrix.laravel-version }} - coverage: none - - name: Execute unit tests via PHPUnit - run: vendor/bin/phpunit - - tests-with-coverage: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v6 - - name: Setup - uses: ./.github/actions/php-laravel-setup - with: - php-version: *php-latest - laravel-version: *laravel-latest - coverage: xdebug - - name: Format code style via Pint - run: vendor/bin/pint --test - - name: Execute unit tests via PHPUnit with coverage - run: vendor/bin/phpunit --coverage-clover build/logs/clover.xml - - name: Export coverage report - uses: actions/upload-artifact@v7 - with: - name: clover.xml - path: build/logs - - upload-to-coveralls: - needs: tests-with-coverage - runs-on: ubuntu-latest - steps: - - name: Set up PHP - uses: shivammathur/setup-php@v2 - - name: Checkout - uses: actions/checkout@v6 - - name: Import coverage report - uses: actions/download-artifact@v7 - with: - name: clover.xml - path: build/logs - - name: Upload coverage results to Coveralls - env: - COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - composer global require php-coveralls/php-coveralls - php-coveralls --coverage_clover=build/logs/clover.xml -v --json_path=coveralls-upload.json diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..a16e380 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,11 @@ +name: Tests + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + run-tests: + uses: ronasit/github-actions/.github/workflows/tests.yml@main