Fix/allow usage in multiple packages #19
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: tests | |
on: | |
workflow_dispatch: | |
pull_request: | |
branches: [development, main] | |
workflow_run: | |
workflows: [codestyle] | |
types: [completed] | |
jobs: | |
workbench-tests: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: true | |
matrix: | |
php: [8.2, 8.3] | |
laravel: [^10, ^11] | |
dependency-version: [prefer-lowest, prefer-stable] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
extensions: zip | |
coverage: xdebug | |
- name: Get Composer Cache Directory | |
id: composer-cache | |
run: | | |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | |
- name: Restore Composer Cache | |
uses: actions/cache@v4 | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
restore-keys: | | |
${{ runner.os }}-composer- | |
- name: Install Composer dependecies | |
run: composer update --no-progress --optimize-autoloader --${{ matrix.dependency-version }} | |
- name: Directory Permissions | |
run: sudo chown -R $(whoami) vendor/pestphp/pest/.temp vendor/orchestra | |
- name: Run tests - coverage threshold 80% | |
run: composer test -- --coverage --min=80 --coverage-clover clover.xml | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v3 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |