feat: implement real-time database synchronization with SSE and update backend modules
This commit is contained in:
@@ -7,7 +7,8 @@ on:
|
||||
branches: [ main, develop ]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
backend-pr-quick:
|
||||
if: github.event_name == 'pull_request'
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
@@ -28,14 +29,64 @@ jobs:
|
||||
working-directory: ./backend
|
||||
run: npm ci
|
||||
|
||||
- name: Prisma schema validate
|
||||
working-directory: ./backend
|
||||
run: npx prisma validate --schema prisma/schema.prisma
|
||||
|
||||
- name: Generate Prisma Client
|
||||
working-directory: ./backend
|
||||
run: npm run prisma:generate
|
||||
|
||||
- name: Verify generated Prisma client is typed
|
||||
working-directory: ./backend
|
||||
run: |
|
||||
if ! grep -q "export \* from '.prisma/client/default'" node_modules/@prisma/client/index.d.ts; then
|
||||
echo "Prisma client export is unexpected";
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
- name: Build NestJS app
|
||||
working-directory: ./backend
|
||||
run: npm run build
|
||||
|
||||
backend-full:
|
||||
if: github.event_name == 'push'
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [24.15.0]
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
cache: 'npm'
|
||||
|
||||
- name: Install dependencies (backend)
|
||||
working-directory: ./backend
|
||||
run: npm ci
|
||||
|
||||
- name: Prisma schema validate
|
||||
working-directory: ./backend
|
||||
run: npx prisma validate --schema prisma/schema.prisma
|
||||
|
||||
- name: Generate Prisma Client
|
||||
working-directory: ./backend
|
||||
run: npm run prisma:generate
|
||||
|
||||
- name: Verify generated Prisma client is typed
|
||||
working-directory: ./backend
|
||||
run: |
|
||||
if ! grep -q "export \* from '.prisma/client/default'" node_modules/@prisma/client/index.d.ts; then
|
||||
echo "Prisma client export is unexpected";
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
- name: Dependency audit (high+critical)
|
||||
working-directory: ./backend
|
||||
run: npm audit --audit-level=high
|
||||
@@ -47,7 +98,6 @@ jobs:
|
||||
- name: Build NestJS app
|
||||
working-directory: ./backend
|
||||
run: npm run build
|
||||
continue-on-error: true
|
||||
|
||||
flutter-quality:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -65,6 +115,16 @@ jobs:
|
||||
- 'flutter/**'
|
||||
- '.github/workflows/test.yml'
|
||||
|
||||
- name: Set Flutter test mode
|
||||
if: steps.filter.outputs.flutter == 'true'
|
||||
shell: bash
|
||||
run: |
|
||||
if [ "${{ github.event_name }}" = "pull_request" ]; then
|
||||
echo "FLUTTER_TEST_CMD=flutter test --reporter=compact" >> "$GITHUB_ENV"
|
||||
else
|
||||
echo "FLUTTER_TEST_CMD=flutter test" >> "$GITHUB_ENV"
|
||||
fi
|
||||
|
||||
- name: Setup Flutter
|
||||
if: steps.filter.outputs.flutter == 'true'
|
||||
uses: subosito/flutter-action@v2
|
||||
@@ -84,4 +144,4 @@ jobs:
|
||||
- name: Run Flutter tests
|
||||
if: steps.filter.outputs.flutter == 'true'
|
||||
working-directory: ./flutter
|
||||
run: flutter test
|
||||
run: ${{ env.FLUTTER_TEST_CMD }}
|
||||
|
||||
Reference in New Issue
Block a user