Skip to content

build(deps-dev): bump cross-spawn from 7.0.3 to 7.0.6 #153

build(deps-dev): bump cross-spawn from 7.0.3 to 7.0.6

build(deps-dev): bump cross-spawn from 7.0.3 to 7.0.6 #153

Workflow file for this run

name: Build and test
on:
pull_request:
branches:
- master
jobs:
laravel-tests:
name: 'Build + test'
runs-on: 'ubuntu-latest'
env:
DB_DATABASE: test_db
DB_USER: root
DB_PASSWORD: root
steps:
- uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv
coverage: none
- uses: actions/setup-node@v4
with:
node-version: '20'
- name: Checkout source code
uses: actions/checkout@v4
- name: Directory Permissions
run: chmod -R 777 storage bootstrap/cache
- name: Copy .env
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
- name: Install backend dependencies
run: |
composer install --prefer-dist --no-progress --no-ansi --no-interaction
echo "${PWD}/vendor/bin" >> $GITHUB_PATH
- name: Generate Routes
run: php artisan ziggy:generate --types
- name: Lint with Pint
run: vendor/bin/pint --test
- name: Install frontend dependencies
run: npm ci
- name: Run frontend linters
run: npm run lint
- name: Build frontend
run: npm run build
- name: Start MySQL
run: |
sudo /etc/init.d/mysql start
mysql -e "CREATE DATABASE IF NOT EXISTS $DB_DATABASE;" -u$DB_USER -p$DB_PASSWORD
- name: Run backend tests
run: php artisan test
- name: Run frontend tests
run: npm run test