Merge pull request #188 from aporat/analysis-7WvB53 #110
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: | |
push: | |
pull_request: | |
release: | |
types: | |
- published | |
schedule: | |
- cron: '0 0 * * *' | |
jobs: | |
php-tests: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
php: [8.2, 8.3, 8.4] | |
os: [ubuntu-latest] | |
coverage: [none] | |
include: | |
- php: 8.3 | |
os: ubuntu-latest | |
coverage: xdebug | |
name: '[P${{ matrix.php }}] [L${{ matrix.laravel }}] [${{ matrix.coverage }}]' | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
extensions: mbstring json openssl xdebug | |
ini-values: memory_limit=-1 | |
tools: composer:v2 | |
coverage: ${{ matrix.coverage }} | |
env: | |
update: true | |
- name: Cache dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
key: "php-${{ matrix.php }}-laravel-${{ matrix.laravel }}-${{ hashFiles('**/composer.json') }}" | |
restore-keys: "php-${{ matrix.php }}-laravel-${{ matrix.laravel }}-${{ hashFiles('**/composer.json') }}" | |
- name: Install Dependencies | |
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist --ignore-platform-reqs | |
- name: Execute tests (Unit and Feature tests) via PHPUnit | |
if: matrix.coverage == 'none' | |
run: composer test | |
- name: Execute tests (Unit and Feature tests) via PHPUnit | |
if: matrix.coverage == 'xdebug' | |
run: composer test:ci | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v5 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
if: matrix.coverage == 'xdebug' | |
slug: aporat/store-receipt-validator |