fix(maestro): attendi rendering card cerchio prima di screenshot e tap #308
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| backend: | |
| name: Backend (build + test) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup .NET 10 | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: '10.0.x' | |
| - name: Restore | |
| working-directory: backend | |
| run: dotnet restore Accanto.slnx | |
| - name: Build | |
| working-directory: backend | |
| run: dotnet build Accanto.slnx -c Release --no-restore | |
| - name: Test | |
| working-directory: backend | |
| run: dotnet test Accanto.slnx -c Release --no-build --logger "trx;LogFileName=test-results.trx" | |
| - name: Upload test results | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: backend-test-results | |
| path: backend/**/TestResults/*.trx | |
| if-no-files-found: ignore | |
| frontend: | |
| name: Frontend (build) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node 22 | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '22' | |
| cache: 'npm' | |
| cache-dependency-path: frontend/package-lock.json | |
| - name: Install | |
| working-directory: frontend | |
| run: npm ci | |
| - name: Build | |
| working-directory: frontend | |
| env: | |
| VITE_API_BASE_URL: /api | |
| run: npm run build | |
| mobile: | |
| name: Mobile (typecheck + jest) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node 22 | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| - name: Install monorepo deps | |
| run: npm ci --legacy-peer-deps | |
| - name: Typecheck mobile | |
| working-directory: mobile | |
| run: npm run typecheck | |
| - name: Jest mobile | |
| working-directory: mobile | |
| run: npm test -- --ci --reporters=default | |
| e2e: | |
| name: E2E (Playwright) | |
| runs-on: ubuntu-latest | |
| needs: [backend, frontend] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node 22 | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '22' | |
| cache: 'npm' | |
| cache-dependency-path: frontend/package-lock.json | |
| - name: Avvia lo stack (docker compose) | |
| env: | |
| # MasterKey è obbligatoria in compose; ne generiamo una al volo per la CI. | |
| Encryption__MasterKey: ${{ secrets.E2E_ENCRYPTION_KEY || 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=' }} | |
| run: docker compose up -d --build | |
| - name: Attendi che backend e frontend rispondano | |
| env: | |
| # Serve anche qui: il fallback esegue `docker compose logs` che re-interpola compose.yml. | |
| Encryption__MasterKey: ${{ secrets.E2E_ENCRYPTION_KEY || 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=' }} | |
| run: | | |
| for i in $(seq 1 120); do | |
| if curl -sf http://localhost:8088/health > /dev/null && curl -sf http://localhost:5173/ > /dev/null; then | |
| echo "Stack pronto dopo $((i*2))s." | |
| exit 0 | |
| fi | |
| sleep 2 | |
| done | |
| echo "Stack non pronto in tempo (240s)." >&2 | |
| docker compose ps | |
| docker compose logs --tail=200 backend | |
| docker compose logs --tail=80 frontend | |
| docker compose logs --tail=40 db | |
| exit 1 | |
| - name: Install frontend deps | |
| working-directory: frontend | |
| run: npm ci | |
| - name: Install Playwright browser | |
| working-directory: frontend | |
| run: npx playwright install --with-deps chromium | |
| - name: Run E2E | |
| working-directory: frontend | |
| env: | |
| E2E_BASE_URL: http://localhost:5173 | |
| run: npm run e2e | |
| - name: Upload Playwright report on failure | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: playwright-report | |
| path: frontend/playwright-report | |
| if-no-files-found: ignore | |
| - name: Upload Playwright traces on failure | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: playwright-test-results | |
| path: frontend/test-results | |
| if-no-files-found: ignore | |
| - name: Dump container logs on failure | |
| if: failure() | |
| env: | |
| # Serve anche qui per la stessa ragione (docker compose logs re-interpola). | |
| Encryption__MasterKey: ${{ secrets.E2E_ENCRYPTION_KEY || 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=' }} | |
| run: | | |
| docker compose ps | |
| docker compose logs --tail=200 backend | |
| docker compose logs --tail=80 frontend | |
| docker compose logs --tail=40 db |