Skip to content
This repository has been archived by the owner on Jun 27, 2024. It is now read-only.

Update README.md

Update README.md #294

Workflow file for this run

name: run-tests
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
php: [8.2, 8.1]
laravel: ["9", "10"]
dependency-version: [prefer-lowest, prefer-stable]
name: L${{ matrix.laravel}} - P${{ matrix.php }} - ${{ matrix.dependency-version }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Cache node modules
id: cache-npm
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- if: ${{ steps.cache-npm.outputs.cache-hit == 'false' }}
name: List the state of node modules
continue-on-error: true
run: npm list
- name: "Install locked dependencies with npm"
run: |
npm ci --ignore-scripts
- name: Build package
run: |
npm run build
npm pack
- 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, mysql, mysqli, pdo_mysql
coverage: none
- name: Downgrade to Laravel 9
run: |
cd app
rm composer.json
mv composer-l9.json composer.json
if: "matrix.laravel == '9'"
- name: Prepare demo app
run: |
cd app
cp .env.example .env
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest
npm ci --ignore-scripts
npm run build
touch database/database.sqlite
php artisan migrate:fresh --seed
php artisan dusk:chrome-driver `/opt/google/chrome/chrome --version | cut -d " " -f3 | cut -d "." -f1`
- name: Start Chrome Driver
run: |
cd app
./vendor/laravel/dusk/bin/chromedriver-linux &
- name: Run Laravel Server
run: |
cd app
php artisan serve &
- name: Execute tests
run: |
cd app
php artisan dusk
- name: Upload Screenshots
if: failure()
uses: actions/upload-artifact@v2
with:
name: screenshots
path: app/tests/Browser/screenshots
- name: Upload Console Logs
if: failure()
uses: actions/upload-artifact@v2
with:
name: console
path: app/tests/Browser/console
- name: Upload Logs
if: failure()
uses: actions/upload-artifact@v2
with:
name: logs
path: app/storage/logs