Skip to content

Quick fix: Rename method to fail #35

Quick fix: Rename method to fail

Quick fix: Rename method to fail #35

Workflow file for this run

name: Tests
on:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: [8.2, 8.3]
laravel: [11.*]
testsuite:
- api
- newsletter
- product-notifications
- product-views
- reviews
- stripe
name: ${{ matrix.testsuite }} - PHP ${{ matrix.php }} - L${{ matrix.laravel }}
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Get Composer Cache Directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache dependencies
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: composer-p${{ matrix.php }}-l${{ matrix.laravel }}-${{ hashFiles('composer.json') }}
restore-keys: composer-p${{ matrix.php }}-l${{ matrix.laravel }}-
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: pdo, sqlite, pdo_sqlite, mbstring, redis
tools: composer:v2
coverage: none
ini-values: error_reporting=E_ALL
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Start Redis
uses: supercharge/[email protected]
if: ${{ startsWith(matrix.testsuite, 'product-views') }}
with:
redis-version: 7
- name: Install dependencies
uses: nick-fields/retry@v2
with:
timeout_minutes: 5
max_attempts: 5
command: composer update --prefer-dist --no-interaction --no-progress
- name: Execute tests
env:
APP_ENV: testing
DB_CONNECTION: testing
DB_DATABASE: ":memory:"
STRIPE_PUBLIC_KEY: ${{ secrets.STRIPE_PUBLIC_KEY }}
STRIPE_SECRET_KEY: ${{ secrets.STRIPE_SECRET_KEY }}
STRIPE_WEBHOOK_SECRET: ${{ secrets.STRIPE_WEBHOOK_SECRET }}
run: ./vendor/bin/pest --testsuite ${{ matrix.testsuite }}
# - name: Execute tests with hashids turned on
# run: composer test-hashids