Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9ebc20ff94 | |||
| 28d2d38857 | |||
| 09f16bd83c | |||
| 512d8e0e24 | |||
| 7aa0e4169e | |||
| 7c9a8151f6 | |||
| be36fc64b3 | |||
| d883bf486f | |||
| 8907d16e40 | |||
| 364065a239 | |||
| 000bf816cc | |||
| 339c5f09f7 | |||
| 7a49291296 |
@@ -9,6 +9,7 @@ on:
|
||||
jobs:
|
||||
a11y:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 20
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
@@ -21,14 +22,16 @@ jobs:
|
||||
extensions: pdo, pdo_pgsql, redis, mbstring, intl, bcmath
|
||||
coverage: none
|
||||
|
||||
- name: Setup Node 20
|
||||
- name: Setup Node 22
|
||||
# Node 22 (>=22.18): корневые tooling-пакеты @cspell/*@10 требуют node>=22.18.
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
node-version: '22'
|
||||
cache: 'npm'
|
||||
|
||||
- name: Install root JS deps
|
||||
run: npm ci --no-audit --no-fund
|
||||
# npm install (не ci): корневой package-lock рассинхронен (gcp-metadata) — pre-existing долг.
|
||||
run: npm install --no-audit --no-fund
|
||||
|
||||
- name: Install app composer deps
|
||||
working-directory: app
|
||||
@@ -36,7 +39,7 @@ jobs:
|
||||
|
||||
- name: Install app JS deps
|
||||
working-directory: app
|
||||
run: npm ci --no-audit --no-fund
|
||||
run: npm ci --no-audit --no-fund --legacy-peer-deps
|
||||
|
||||
- name: Bootstrap .env + key
|
||||
working-directory: app
|
||||
@@ -44,12 +47,19 @@ jobs:
|
||||
cp .env.example .env
|
||||
php artisan key:generate --force
|
||||
|
||||
- name: Prepare SQLite for CI (avoid pg-on-CI fixture cost)
|
||||
- name: Prepare SQLite (public Pa11y routes need no real DB)
|
||||
# Pa11y покрывает 7 публичных SPA-маршрутов (login/register/forgot/2fa/recovery/403/500) —
|
||||
# они рендерятся без БД. Полная-PostgreSQL сборка с миграциями/seed отложена в отдельную
|
||||
# задачу (схема и миграции разошлись → from-scratch migrate сломан).
|
||||
working-directory: app
|
||||
run: |
|
||||
mkdir -p storage/framework/sessions storage/framework/views storage/framework/cache storage/logs bootstrap/cache
|
||||
touch database/database.sqlite
|
||||
sed -i 's/DB_CONNECTION=.*/DB_CONNECTION=sqlite/' .env
|
||||
sed -i 's|DB_DATABASE=.*|DB_DATABASE=/home/runner/work/${{ github.event.repository.name }}/${{ github.event.repository.name }}/app/database/database.sqlite|' .env
|
||||
sed -i 's/SESSION_DRIVER=.*/SESSION_DRIVER=file/' .env
|
||||
sed -i 's/CACHE_STORE=.*/CACHE_STORE=file/' .env
|
||||
sed -i 's/QUEUE_CONNECTION=.*/QUEUE_CONNECTION=sync/' .env
|
||||
|
||||
- name: Build frontend assets
|
||||
working-directory: app
|
||||
@@ -72,9 +82,14 @@ jobs:
|
||||
tail -50 /tmp/laravel-serve.log
|
||||
exit 1
|
||||
|
||||
- name: Run Pa11y (live Vue)
|
||||
- name: Run Pa11y (live Vue — 7 public routes)
|
||||
run: npm run a11y
|
||||
|
||||
- name: Laravel log tail on failure
|
||||
if: failure()
|
||||
working-directory: app
|
||||
run: tail -120 storage/logs/laravel.log || echo "no laravel.log"
|
||||
|
||||
- name: Upload Pa11y screenshots
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
|
||||
@@ -108,7 +108,16 @@ class MonthlyPartitionManager
|
||||
if ($exists !== null) {
|
||||
return false;
|
||||
}
|
||||
// Родитель-партиционированная таблица может ещё не существовать
|
||||
// (создаётся более поздней миграцией) — тогда пропускаем.
|
||||
$parentExists = DB::selectOne(
|
||||
"SELECT 1 AS ok FROM pg_class WHERE relname = ? AND relkind = 'p'",
|
||||
[$table],
|
||||
);
|
||||
|
||||
if ($parentExists === null) {
|
||||
return false;
|
||||
}
|
||||
DB::connection(self::DDL_CONNECTION)->statement(sprintf(
|
||||
"CREATE TABLE %s PARTITION OF %s FOR VALUES FROM ('%s') TO ('%s')",
|
||||
$partition,
|
||||
|
||||
@@ -169,6 +169,10 @@ final class RussianRegions
|
||||
// «обл.» → «область»; « АО» → « автономный округ».
|
||||
$name = (string) preg_replace('/\s*обл\.$/u', ' область', $segment);
|
||||
$name = (string) preg_replace('/\s+АО$/u', ' автономный округ', $name);
|
||||
// Дефис с пробелами → длинное тире (эталон: «Республика Северная Осетия — Алания»).
|
||||
// Безопасно: ни одно каноническое имя не содержит дефис, окружённый пробелами
|
||||
// (составные имена вроде «Кабардино-Балкарская» используют дефис без пробелов).
|
||||
$name = str_replace(' - ', ' — ', $name);
|
||||
|
||||
if (isset(self::nameToCode()[$name])) {
|
||||
return $name;
|
||||
|
||||
@@ -18,6 +18,7 @@ use Illuminate\Support\Facades\DB;
|
||||
*/
|
||||
return new class extends Migration
|
||||
{
|
||||
public $withinTransaction = false;
|
||||
public function up(): void
|
||||
{
|
||||
$schemaPath = dirname(base_path()).DIRECTORY_SEPARATOR.'db'.DIRECTORY_SEPARATOR.'schema.sql';
|
||||
|
||||
@@ -95,3 +95,8 @@ it('maps Moscow / SPb spelling variants', function (): void {
|
||||
expect(RussianRegions::resolveSubjectCode('Город Москва'))->toBe(82)
|
||||
->and(RussianRegions::resolveSubjectCode('г. Санкт - Петербург'))->toBe(83);
|
||||
});
|
||||
|
||||
it('normalizes spaced hyphen to em-dash (Северная Осетия — Алания)', function (): void {
|
||||
expect(RussianRegions::resolveSubjectCode('Республика Северная Осетия - Алания'))->toBe(18)
|
||||
->and(RussianRegions::resolveSubjectCode('г. Владикавказ|Республика Северная Осетия - Алания'))->toBe(18);
|
||||
});
|
||||
|
||||
@@ -47,200 +47,6 @@
|
||||
{
|
||||
"url": "http://localhost:8000/500",
|
||||
"screenCapture": "./bin/a11y-screenshots/live-07-500.png"
|
||||
},
|
||||
{
|
||||
"url": "http://localhost:8000/dashboard",
|
||||
"screenCapture": "./bin/a11y-screenshots/live-auth-08-dashboard.png",
|
||||
"actions": [
|
||||
"navigate to http://localhost:8000/login",
|
||||
"wait for element input[autocomplete=\"email\"] to be visible",
|
||||
"set field input[autocomplete=\"email\"] to admin@demo.local",
|
||||
"set field input[autocomplete=\"current-password\"] to password",
|
||||
"click element button[type=\"submit\"]",
|
||||
"wait for path to be /dashboard"
|
||||
]
|
||||
},
|
||||
{
|
||||
"url": "http://localhost:8000/deals",
|
||||
"screenCapture": "./bin/a11y-screenshots/live-auth-09-deals.png",
|
||||
"actions": [
|
||||
"navigate to http://localhost:8000/login",
|
||||
"wait for element input[autocomplete=\"email\"] to be visible",
|
||||
"set field input[autocomplete=\"email\"] to admin@demo.local",
|
||||
"set field input[autocomplete=\"current-password\"] to password",
|
||||
"click element button[type=\"submit\"]",
|
||||
"wait for path to be /dashboard",
|
||||
"navigate to http://localhost:8000/deals",
|
||||
"wait for path to be /deals"
|
||||
]
|
||||
},
|
||||
{
|
||||
"url": "http://localhost:8000/kanban",
|
||||
"screenCapture": "./bin/a11y-screenshots/live-auth-10-kanban.png",
|
||||
"actions": [
|
||||
"navigate to http://localhost:8000/login",
|
||||
"wait for element input[autocomplete=\"email\"] to be visible",
|
||||
"set field input[autocomplete=\"email\"] to admin@demo.local",
|
||||
"set field input[autocomplete=\"current-password\"] to password",
|
||||
"click element button[type=\"submit\"]",
|
||||
"wait for path to be /dashboard",
|
||||
"navigate to http://localhost:8000/kanban",
|
||||
"wait for path to be /kanban"
|
||||
]
|
||||
},
|
||||
{
|
||||
"url": "http://localhost:8000/projects",
|
||||
"screenCapture": "./bin/a11y-screenshots/live-auth-11-projects.png",
|
||||
"actions": [
|
||||
"navigate to http://localhost:8000/login",
|
||||
"wait for element input[autocomplete=\"email\"] to be visible",
|
||||
"set field input[autocomplete=\"email\"] to admin@demo.local",
|
||||
"set field input[autocomplete=\"current-password\"] to password",
|
||||
"click element button[type=\"submit\"]",
|
||||
"wait for path to be /dashboard",
|
||||
"navigate to http://localhost:8000/projects",
|
||||
"wait for path to be /projects"
|
||||
]
|
||||
},
|
||||
{
|
||||
"url": "http://localhost:8000/billing",
|
||||
"screenCapture": "./bin/a11y-screenshots/live-auth-12-billing.png",
|
||||
"actions": [
|
||||
"navigate to http://localhost:8000/login",
|
||||
"wait for element input[autocomplete=\"email\"] to be visible",
|
||||
"set field input[autocomplete=\"email\"] to admin@demo.local",
|
||||
"set field input[autocomplete=\"current-password\"] to password",
|
||||
"click element button[type=\"submit\"]",
|
||||
"wait for path to be /dashboard",
|
||||
"navigate to http://localhost:8000/billing",
|
||||
"wait for path to be /billing"
|
||||
]
|
||||
},
|
||||
{
|
||||
"url": "http://localhost:8000/settings",
|
||||
"screenCapture": "./bin/a11y-screenshots/live-auth-13-settings.png",
|
||||
"actions": [
|
||||
"navigate to http://localhost:8000/login",
|
||||
"wait for element input[autocomplete=\"email\"] to be visible",
|
||||
"set field input[autocomplete=\"email\"] to admin@demo.local",
|
||||
"set field input[autocomplete=\"current-password\"] to password",
|
||||
"click element button[type=\"submit\"]",
|
||||
"wait for path to be /dashboard",
|
||||
"navigate to http://localhost:8000/settings",
|
||||
"wait for path to be /settings"
|
||||
]
|
||||
},
|
||||
{
|
||||
"url": "http://localhost:8000/reports",
|
||||
"screenCapture": "./bin/a11y-screenshots/live-auth-14-reports.png",
|
||||
"actions": [
|
||||
"navigate to http://localhost:8000/login",
|
||||
"wait for element input[autocomplete=\"email\"] to be visible",
|
||||
"set field input[autocomplete=\"email\"] to admin@demo.local",
|
||||
"set field input[autocomplete=\"current-password\"] to password",
|
||||
"click element button[type=\"submit\"]",
|
||||
"wait for path to be /dashboard",
|
||||
"navigate to http://localhost:8000/reports",
|
||||
"wait for path to be /reports"
|
||||
]
|
||||
},
|
||||
{
|
||||
"url": "http://localhost:8000/reminders",
|
||||
"screenCapture": "./bin/a11y-screenshots/live-auth-15-reminders.png",
|
||||
"actions": [
|
||||
"navigate to http://localhost:8000/login",
|
||||
"wait for element input[autocomplete=\"email\"] to be visible",
|
||||
"set field input[autocomplete=\"email\"] to admin@demo.local",
|
||||
"set field input[autocomplete=\"current-password\"] to password",
|
||||
"click element button[type=\"submit\"]",
|
||||
"wait for path to be /dashboard",
|
||||
"navigate to http://localhost:8000/reminders",
|
||||
"wait for path to be /reminders"
|
||||
]
|
||||
},
|
||||
{
|
||||
"url": "http://localhost:8000/admin/tenants",
|
||||
"screenCapture": "./bin/a11y-screenshots/live-auth-16-admin-tenants.png",
|
||||
"actions": [
|
||||
"navigate to http://localhost:8000/login",
|
||||
"wait for element input[autocomplete=\"email\"] to be visible",
|
||||
"set field input[autocomplete=\"email\"] to admin@demo.local",
|
||||
"set field input[autocomplete=\"current-password\"] to password",
|
||||
"click element button[type=\"submit\"]",
|
||||
"wait for path to be /dashboard",
|
||||
"navigate to http://localhost:8000/admin/tenants",
|
||||
"wait for path to be /admin/tenants"
|
||||
]
|
||||
},
|
||||
{
|
||||
"url": "http://localhost:8000/admin/billing",
|
||||
"screenCapture": "./bin/a11y-screenshots/live-auth-17-admin-billing.png",
|
||||
"actions": [
|
||||
"navigate to http://localhost:8000/login",
|
||||
"wait for element input[autocomplete=\"email\"] to be visible",
|
||||
"set field input[autocomplete=\"email\"] to admin@demo.local",
|
||||
"set field input[autocomplete=\"current-password\"] to password",
|
||||
"click element button[type=\"submit\"]",
|
||||
"wait for path to be /dashboard",
|
||||
"navigate to http://localhost:8000/admin/billing",
|
||||
"wait for path to be /admin/billing"
|
||||
]
|
||||
},
|
||||
{
|
||||
"url": "http://localhost:8000/admin/incidents",
|
||||
"screenCapture": "./bin/a11y-screenshots/live-auth-18-admin-incidents.png",
|
||||
"actions": [
|
||||
"navigate to http://localhost:8000/login",
|
||||
"wait for element input[autocomplete=\"email\"] to be visible",
|
||||
"set field input[autocomplete=\"email\"] to admin@demo.local",
|
||||
"set field input[autocomplete=\"current-password\"] to password",
|
||||
"click element button[type=\"submit\"]",
|
||||
"wait for path to be /dashboard",
|
||||
"navigate to http://localhost:8000/admin/incidents",
|
||||
"wait for path to be /admin/incidents"
|
||||
]
|
||||
},
|
||||
{
|
||||
"url": "http://localhost:8000/admin/system",
|
||||
"screenCapture": "./bin/a11y-screenshots/live-auth-19-admin-system.png",
|
||||
"actions": [
|
||||
"navigate to http://localhost:8000/login",
|
||||
"wait for element input[autocomplete=\"email\"] to be visible",
|
||||
"set field input[autocomplete=\"email\"] to admin@demo.local",
|
||||
"set field input[autocomplete=\"current-password\"] to password",
|
||||
"click element button[type=\"submit\"]",
|
||||
"wait for path to be /dashboard",
|
||||
"navigate to http://localhost:8000/admin/system",
|
||||
"wait for path to be /admin/system"
|
||||
]
|
||||
},
|
||||
{
|
||||
"url": "http://localhost:8000/admin/pricing-tiers",
|
||||
"screenCapture": "./bin/a11y-screenshots/live-auth-20-admin-pricing-tiers.png",
|
||||
"actions": [
|
||||
"navigate to http://localhost:8000/login",
|
||||
"wait for element input[autocomplete=\"email\"] to be visible",
|
||||
"set field input[autocomplete=\"email\"] to admin@demo.local",
|
||||
"set field input[autocomplete=\"current-password\"] to password",
|
||||
"click element button[type=\"submit\"]",
|
||||
"wait for path to be /dashboard",
|
||||
"navigate to http://localhost:8000/admin/pricing-tiers",
|
||||
"wait for path to be /admin/pricing-tiers"
|
||||
]
|
||||
},
|
||||
{
|
||||
"url": "http://localhost:8000/admin/supplier-prices",
|
||||
"screenCapture": "./bin/a11y-screenshots/live-auth-21-admin-supplier-prices.png",
|
||||
"actions": [
|
||||
"navigate to http://localhost:8000/login",
|
||||
"wait for element input[autocomplete=\"email\"] to be visible",
|
||||
"set field input[autocomplete=\"email\"] to admin@demo.local",
|
||||
"set field input[autocomplete=\"current-password\"] to password",
|
||||
"click element button[type=\"submit\"]",
|
||||
"wait for path to be /dashboard",
|
||||
"navigate to http://localhost:8000/admin/supplier-prices",
|
||||
"wait for path to be /admin/supplier-prices"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user