E2E Tests #145
Workflow file for this run
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: E2E Tests (Tauri App) | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [main, develop, 'vk/**'] | |
| pull_request: | |
| branches: [main] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| e2e-tauri: | |
| name: E2E Tauri Tests (Self-Hosted Linux) | |
| runs-on: [self-hosted, linux, lokus-e2e] | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Clean previous builds | |
| run: | | |
| # Clean old artifacts to save disk space | |
| rm -rf node_modules/.cache | |
| rm -rf src-tauri/target/debug/build | |
| rm -rf src-tauri/target/debug/deps | |
| rm -rf src-tauri/target/debug/incremental | |
| rm -rf playwright-report-tauri | |
| rm -rf test-results-tauri | |
| # Keep only the last log file | |
| find . -name "*.log" -type f -mmin +60 -delete 2>/dev/null || true | |
| - name: Install Node dependencies | |
| run: npm ci | |
| - name: Build tauri-playwright-helpers | |
| run: npm run build --workspace=tauri-playwright-helpers | |
| - name: Build frontend | |
| run: npm run bundle:mcp && npm run build | |
| - name: Build Tauri binary (debug, no bundling) | |
| run: | | |
| source $HOME/.cargo/env | |
| cargo build --manifest-path src-tauri/Cargo.toml | |
| env: | |
| TAURI_SIGNING_PRIVATE_KEY: '' | |
| - name: Run Tauri E2E tests | |
| run: | | |
| source $HOME/.cargo/env | |
| xvfb-run --auto-servernum --server-args="-screen 0 1920x1080x24" npm run test:e2e:tauri | |
| env: | |
| CI: 'true' | |
| TAURI_BINARY: ./src-tauri/target/debug/lokus | |
| DISPLAY: ':99' | |
| # Force software rendering for VM without GPU | |
| LIBGL_ALWAYS_SOFTWARE: '1' | |
| WEBKIT_DISABLE_COMPOSITING_MODE: '1' | |
| - name: Upload Tauri test report | |
| uses: actions/upload-artifact@v4 | |
| if: ${{ !cancelled() }} | |
| with: | |
| name: playwright-report-tauri | |
| path: playwright-report-tauri/ | |
| retention-days: 3 | |
| - name: Upload Tauri test results | |
| uses: actions/upload-artifact@v4 | |
| if: failure() | |
| with: | |
| name: test-results-tauri | |
| path: test-results-tauri/ | |
| retention-days: 3 | |
| - name: Cleanup after run | |
| if: always() | |
| run: | | |
| # Clean build artifacts to save disk space | |
| rm -rf src-tauri/target/debug/build | |
| rm -rf src-tauri/target/debug/deps | |
| rm -rf src-tauri/target/debug/incremental | |
| # Keep the binary for caching but clean intermediate files | |
| find src-tauri/target -name "*.rlib" -delete 2>/dev/null || true | |
| find src-tauri/target -name "*.rmeta" -delete 2>/dev/null || true | |
| summary: | |
| name: Test Summary | |
| needs: [e2e-tauri] | |
| runs-on: [self-hosted, linux, lokus-e2e] | |
| if: always() | |
| steps: | |
| - name: Generate Summary | |
| run: | | |
| echo "# Tauri E2E Test Results" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "| Platform | Status |" >> $GITHUB_STEP_SUMMARY | |
| echo "|----------|--------|" >> $GITHUB_STEP_SUMMARY | |
| if [ "${{ needs.e2e-tauri.result }}" == "success" ]; then | |
| echo "| Linux (Self-Hosted) | Passed |" >> $GITHUB_STEP_SUMMARY | |
| elif [ "${{ needs.e2e-tauri.result }}" == "failure" ]; then | |
| echo "| Linux (Self-Hosted) | Failed |" >> $GITHUB_STEP_SUMMARY | |
| else | |
| echo "| Linux (Self-Hosted) | ${{ needs.e2e-tauri.result }} |" >> $GITHUB_STEP_SUMMARY | |
| fi | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "Download Playwright HTML reports from workflow artifacts." >> $GITHUB_STEP_SUMMARY |