Skip to content

Update PHP dependencies #441

Update PHP dependencies

Update PHP dependencies #441

Workflow file for this run

name: CI
on:
push:
branches: [master]
pull_request:
branches: [master]
env:
PHP_VERSION: "8.2"
NODE_VERSION: "20"
jobs:
laravel-tests:
name: Laravel tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ env.PHP_VERSION }}
- name: Copy .env
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
- name: Install PHP dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress
- name: Code style check
run: php ./vendor/bin/pint --test
- name: Static code analysis
run: php ./vendor/bin/phpstan analyse --no-progress
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install NPM packages
run: npm ci
- name: Audit NPM packages
run: npm audit --omit dev
- name: Build JS/CSS assets
run: npm run build
- name: Generate key
run: php artisan key:generate
## TODO DB tests disabled until issue with sqlite migrations solved
# - name: Directory Permissions
# run: chmod -R 777 storage bootstrap/cache
# - name: Create Database
# run: |
# mkdir -p database
# touch database/database.sqlite
# - name: Execute tests (Unit and Feature tests) via PHPUnit
# env:
# DB_CONNECTION: sqlite
# DB_DATABASE: database/database.sqlite
# CACHE_DRIVER: array
# SESSION_DRIVER: array
# QUEUE_DRIVER: sync
# run: vendor/bin/phpunit