You've already forked Epicnabbo-Catalogus-Updated-Daily
🆙 Fix cms as now on epicnabbo.nl 🆙
This commit is contained in:
+77
@@ -0,0 +1,77 @@
|
||||
name: Laravel
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main", "dev" ]
|
||||
pull_request:
|
||||
branches: [ "main", "dev" ]
|
||||
|
||||
jobs:
|
||||
tests:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
services:
|
||||
mariadb:
|
||||
image: mariadb:11
|
||||
env:
|
||||
MYSQL_ALLOW_EMPTY_PASSWORD: yes
|
||||
MYSQL_DATABASE: atomcms_testing
|
||||
ports:
|
||||
- 3306:3306
|
||||
options: --health-cmd="healthcheck.sh --connect --innodb_initialized" --health-interval=10s --health-timeout=5s --health-retries=3
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Cache composer dependencies
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: vendor
|
||||
key: composer-${{ hashFiles('**/composer.lock') }}
|
||||
restore-keys: |
|
||||
composer-
|
||||
|
||||
- name: Install PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: 8.4
|
||||
|
||||
- name: Install composer dependencies
|
||||
run: |
|
||||
composer install --no-scripts
|
||||
|
||||
- name: Install NPM dependencies
|
||||
run: npm install
|
||||
|
||||
- name: Compile assets
|
||||
run: npm run build:atom
|
||||
|
||||
- name: Prepare Laravel Application
|
||||
run: |
|
||||
cp .env.testing.example .env.testing
|
||||
# Override database config for GitHub Actions
|
||||
sed -i 's/DB_USERNAME=docker/DB_USERNAME=root/' .env.testing
|
||||
sed -i 's/DB_PASSWORD=password/DB_PASSWORD=/' .env.testing
|
||||
sed -i 's/DB_DATABASE=testing/DB_DATABASE=atomcms_testing/' .env.testing
|
||||
php artisan key:generate --env=testing
|
||||
|
||||
- name: Debug Laravel Configuration
|
||||
run: |
|
||||
php artisan config:cache --env=testing
|
||||
php artisan route:cache --env=testing
|
||||
php artisan view:cache --env=testing
|
||||
|
||||
- name: Create storage directories
|
||||
run: |
|
||||
mkdir -p storage/app/public
|
||||
mkdir -p storage/framework/cache
|
||||
mkdir -p storage/framework/sessions
|
||||
mkdir -p storage/framework/views
|
||||
mkdir -p storage/logs
|
||||
chmod -R 755 storage
|
||||
|
||||
- name: Run Test suite with debug
|
||||
run: |
|
||||
php artisan test --env=testing --stop-on-failure
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
name: Fix Code Style
|
||||
|
||||
on: [push]
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
php: [8.4]
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v5
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ matrix.php }}
|
||||
tools: composer, pint
|
||||
|
||||
- name: Install composer dependencies
|
||||
run: composer install --prefer-dist --no-interaction --no-progress
|
||||
|
||||
- name: Run Pint
|
||||
run: pint
|
||||
|
||||
- name: Commit linted files
|
||||
uses: stefanzweifel/git-auto-commit-action@v5
|
||||
with:
|
||||
commit_message: 'style: fix code style with Laravel Pint'
|
||||
Reference in New Issue
Block a user