Skip to content

chore(deps): bump actions/upload-artifact from 3 to 4 #547

chore(deps): bump actions/upload-artifact from 3 to 4

chore(deps): bump actions/upload-artifact from 3 to 4 #547

Workflow file for this run

name: Run integration tests
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
integration-test:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
php: [8.1, 8.2]
laravel: [10]
livewire: [2, 3]
name: Integration tests - PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} - Livewire ${{ matrix.livewire }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
coverage: none
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create test database
run: |
sudo systemctl start mysql.service
mysqladmin create laravel --user="root" --password="root"
- name: Create project
run: |
composer create-project --prefer-dist laravel/laravel:^${{ matrix.laravel }} tests/integration --no-interaction
- name: Install Pest and Livewire
run: |
cd tests/integration
composer remove phpunit/phpunit --dev
composer require pestphp/pest:^2.0 pestphp/pest-plugin-laravel:^2.0 pestphp/pest-plugin-drift:^2.0 --dev
vendor/bin/pest --init
vendor/bin/pest --drift
composer require livewire/livewire:^${{ matrix.livewire }}
- name: Determine Hearth version
run: |
echo "hearth_version=${{ github.head_ref }}" >> $GITHUB_ENV
if: github.event_name == 'pull_request'
- name: Determine Hearth version
run: |
echo "hearth_version=main" >> $GITHUB_ENV
if: github.event_name != 'pull_request'
- name: Configure Composer repository
run: |
cd tests/integration
composer config repositories.head vcs https://github.com/${{ github.event.pull_request.head.repo.full_name }}
if: github.event_name == 'pull_request'
- name: Install Hearth
run: |
cd tests/integration
php artisan lang:publish
composer require fluid-project/hearth:dev-${{ env.hearth_version }} --no-interaction
php artisan hearth:install --two-factor --no-interaction
echo 'MAIL_FROM_ADDRESS=from@example.com' >> .env
npm install
- name: Run tests
env:
DB_PASSWORD: root
DB_HOST: localhost
run: |
cd tests/integration
php artisan migrate
php artisan test
- name: Run lint analysis
run: |
cd tests/integration
composer require nunomaduro/larastan:^2.0 --dev
vendor/bin/phpstan analyse