Merge pull request #19 from depage/dependabot/github_actions/github-a… #11
This file contains hidden or 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
| # GitHub Action for Laravel | |
| name: Testing HtmlForm | |
| on: [push, pull_request] | |
| jobs: | |
| tests: | |
| name: Test (PHP ${{ matrix.php-versions }} on ${{ matrix.operating-system }}) | |
| runs-on: ${{ matrix.operating-system }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| operating-system: [ubuntu-latest] | |
| php-versions: ['8.3', '8.4', '8.5'] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| # Docs: https://github.com/shivammathur/setup-php | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php-versions }} | |
| extensions: mbstring, dom | |
| coverage: xdebug | |
| - name: Get composer cache directory | |
| id: composer-cache | |
| shell: bash | |
| run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | |
| - name: Cache composer dependencies | |
| uses: actions/cache@v6 | |
| with: | |
| path: ${{ steps.composer-cache.outputs.dir }} | |
| key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} | |
| restore-keys: ${{ runner.os }}-composer- | |
| - name: Install Composer dependencies | |
| run: composer install --no-progress --prefer-dist --optimize-autoloader | |
| - name: Test with phpunit | |
| run: vendor/bin/phpunit --no-coverage |