账期收付改为按累计已付同步 credit_ledger,修复多笔 partial_paid 与坏账核销重复释额;新增 API E2E(占成、权限、部分收付/坏账)与 GitHub Actions e2e-api job。 Co-authored-by: Cursor <cursoragent@cursor.com>
58 lines
1.3 KiB
YAML
58 lines
1.3 KiB
YAML
name: lotterLaravel E2E
|
|
|
|
on:
|
|
push:
|
|
branches: [main, master, develop]
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: e2e-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
e2e-api:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 45
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: shivammathur/setup-php@v2
|
|
with:
|
|
php-version: "8.3"
|
|
extensions: pdo_pgsql, redis
|
|
coverage: none
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "20"
|
|
cache: npm
|
|
cache-dependency-path: e2e/package-lock.json
|
|
|
|
- name: Install PHP dependencies
|
|
run: composer install --no-interaction --prefer-dist
|
|
|
|
- name: Install Playwright dependencies
|
|
working-directory: e2e
|
|
run: npm ci
|
|
|
|
- name: Install Playwright Chromium
|
|
working-directory: e2e
|
|
run: npx playwright install chromium --with-deps
|
|
|
|
- name: Run E2E stack (API only)
|
|
env:
|
|
E2E_UI: "0"
|
|
CI: "true"
|
|
run: ./e2e/scripts/run.sh
|
|
|
|
- name: Upload artifacts on failure
|
|
if: failure()
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: e2e-artifacts
|
|
path: |
|
|
e2e/artifacts/
|
|
e2e/logs/
|
|
if-no-files-found: ignore
|