Skip to content

Delete composer.lock #19

Delete composer.lock

Delete composer.lock #19

name: Laravel
on:
push:
branches:
- master
jobs:
build-and-test:
runs-on: self-hosted
steps:
- name: Checkout
uses: actions/checkout@v4
# Setup PHP
- uses: shivammathur/setup-php@15c43e89cdef867065b0213be354c2841860869e
with:
php-version: "8.2"
# Checkout and prepare repo
- name: Copy .env
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
# Install Composer Dependencies
- name: Install PHP Dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
# Install node.js and run npm commands
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Install NPM Dependencies
run: npm install
- name: Build Assets
run: npm run build
# Prepare php test environment
- name: Generate key
run: php artisan key:generate
- name: Directory Permissions
run: chmod -R 777 storage bootstrap/cache
- name: Create Database
run: |
mkdir -p database
touch database/database.sqlite
# Execute tests
- name: Execute tests (Unit and Feature tests) via PHPUnit/Pest
env:
DB_CONNECTION: sqlite
DB_DATABASE: database/database.sqlite
run: php artisan test
# Publish Artifact for later use
- name: Publish Artifact
uses: actions/[email protected]
with:
path: .
name: laravel-app