fix: PDF EOF issue in preview tab and restore endpoint #112
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: Playwright Tests | |
| on: | |
| push: | |
| branches: [ main, master, develop ] | |
| paths: | |
| - 'core/src/main/webapp/ui/**' | |
| pull_request: | |
| branches: [ main, master, develop ] | |
| paths: | |
| - 'core/src/main/webapp/ui/**' | |
| jobs: | |
| test: | |
| timeout-minutes: 90 | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Java 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| cache-dependency-path: core/src/main/webapp/ui/package-lock.json | |
| - name: Install UI dependencies | |
| working-directory: core/src/main/webapp/ui | |
| run: npm ci | |
| - name: Install Playwright Browsers | |
| working-directory: core/src/main/webapp/ui | |
| run: npx playwright install --with-deps | |
| - name: Build NemakiWare Dependencies | |
| run: | | |
| # Build parent POM first | |
| echo "Installing parent POM..." | |
| mvn clean install -N -DskipTests -q | |
| # Build dependency modules | |
| echo "Building common module..." | |
| mvn clean install -f common/pom.xml -DskipTests -q | |
| echo "Building cloudant-init module..." | |
| mvn clean install -f cloudant-init/pom.xml -DskipTests -q | |
| echo "Building solr module..." | |
| mvn clean install -f solr/pom.xml -DskipTests -q | |
| - name: Build NemakiWare Core | |
| run: | | |
| mvn clean package -f core/pom.xml -Pdevelopment -DskipTests -q | |
| - name: Start NemakiWare Backend | |
| run: | | |
| cd docker | |
| cp ../core/target/core.war core/core.war | |
| docker compose -f docker-compose-simple.yml up -d --build | |
| # Wait for backend to be ready | |
| timeout 120s bash -c ' | |
| while ! curl -f -u admin:admin http://localhost:8080/core/atom/bedroom >/dev/null 2>&1; do | |
| echo "Waiting for NemakiWare backend..." | |
| sleep 5 | |
| done | |
| ' | |
| echo "✅ NemakiWare backend is ready" | |
| - name: Build UI | |
| working-directory: core/src/main/webapp/ui | |
| run: npm run build | |
| - name: Run Playwright tests | |
| working-directory: core/src/main/webapp/ui | |
| env: | |
| PLAYWRIGHT_BASE_URL: http://localhost:8080 | |
| run: npm run test | |
| - name: Upload Playwright Report | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: playwright-report | |
| path: core/src/main/webapp/ui/playwright-report/ | |
| retention-days: 30 | |
| - name: Upload Test Results | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: test-results | |
| path: core/src/main/webapp/ui/test-results/ | |
| retention-days: 30 | |
| - name: Cleanup | |
| if: always() | |
| run: | | |
| cd docker | |
| docker compose -f docker-compose-simple.yml down | |
| docker system prune -f |