Merge pull request #81 from Hi-Folks/feat/upgade-php83 #92
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
# GithHub Actions Workflow generated with Ghygen | |
# Original configuration: https://ghygen.hi-folks.dev?code=bd6e22bb61a382d98701f18b525eae86 | |
name: Test Coverage PHP Package | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
laravel-tests: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
operating-system: [ubuntu-latest] | |
php-versions: [ '8.3' ] | |
dependency-stability: [ 'prefer-none' ] | |
name: P${{ matrix.php-versions }} - L${{ matrix.laravel }} - ${{ matrix.dependency-stability }} - ${{ matrix.operating-system}} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install PHP versions | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-versions }} | |
- name: Install Dependencies | |
if: steps.vendor-cache.outputs.cache-hit != 'true' | |
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist | |
- name: Update Dependencies with latest stable | |
if: matrix.dependency-stability == 'prefer-stable' | |
run: composer update --prefer-stable | |
- name: Update Dependencies with lowest stable | |
if: matrix.dependency-stability == 'prefer-lowest' | |
run: composer update --prefer-stable --prefer-lowest | |
- name: Show dir | |
run: pwd | |
- name: PHP Version | |
run: php --version | |
# Code quality | |
- name: Execute tests (Unit and Feature tests) via PestPHP | |
# Set environment | |
env: | |
SESSION_DRIVER: array | |
run: vendor/bin/pest --coverage-clover clover.xml | |
- name: Generate test coverage badge | |
uses: timkrase/phpunit-coverage-badge@v1.2.1 | |
with: | |
coverage_badge_path: 'badge-coverage.svg' | |
push_badge: true | |
repo_token: ${{ secrets.GITHUB_TOKEN }} |