phpcbf and added .gitea workflows

This commit is contained in:
2026-01-23 20:32:22 -08:00
parent 4b45725b33
commit a033c13b8d
24 changed files with 949 additions and 919 deletions

View File

@@ -12,8 +12,8 @@ jobs:
fail-fast: false
matrix:
php-version: ['8.2', '8.4']
db-type: ['mysql']
# db-type: ['sqlite', 'mysql', 'pgsql']
# db-type: ['mysql']
db-type: ['sqlite', 'mysql', 'pgsql']
prefer-lowest: ['']
include:
- php-version: '8.2'
@@ -26,20 +26,13 @@ jobs:
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_DATABASE: cakephp
# services:
# postgres:
# image: postgres
# ports:
# - 5432:5432
# env:
# POSTGRES_PASSWORD: postgres
# mysql8:
# image: mysql:8.0
# env:
# MYSQL_ALLOW_EMPTY_PASSWORD: yes
# MYSQL_DATABASE: test_db
# ports:
# - 3306:3306
# services:
# postgres:
# image: postgres
# ports:
# - 5432:5432
# env:
# POSTGRES_PASSWORD: postgres
steps:
- uses: actions/checkout@v4
@@ -47,7 +40,7 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: mbstring, intl, sqlite, pdo_${{ matrix.db-type }}
extensions: mbstring, intl, bcmath, sqlite, pdo_${{ matrix.db-type }}
coverage: pcov
- name: Get composer cache directory
@@ -94,11 +87,11 @@ jobs:
if: matrix.prefer-lowest == 'prefer-lowest'
run: vendor/bin/validate-prefer-lowest -m
# - name: Upload coverage reports to Codecov
# if: success() && matrix.php-version == '8.2'
# uses: codecov/codecov-action@v4
# with:
# token: ${{ secrets.CODECOV_TOKEN }}
# - name: Upload coverage reports to Codecov
# if: success() && matrix.php-version == '8.2'
# uses: codecov/codecov-action@v4
# with:
# token: ${{ secrets.CODECOV_TOKEN }}
validation:
name: Coding Standard & Static Analysis
@@ -108,8 +101,8 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
extensions: mbstring, intl, sqlite
php-version: '8.2'
extensions: mbstring, intl, sqlite, bcmath
coverage: none
- name: Get composer cache directory
@@ -133,11 +126,8 @@ jobs:
composer install --no-progress --prefer-dist --optimize-autoloader
fi
- name: Composer phpstan setup
run: composer stan-setup
- name: Run phpstan
run: vendor/bin/phpstan analyse --error-format=github
run: vendor/bin/phpstan analyse src --error-format=github
- name: Run phpcs
run: composer cs-check
run: composer cs-check

View File

@@ -0,0 +1,17 @@
name: Release
on:
push:
tags:
- "v*.*.*"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Release
uses: softprops/action-gh-release@v2