Bump ajv from 8.12.0 to 8.18.0 #81
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 Local Dist Tests | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| branch: | |
| description: 'Branch to run tests on' | |
| required: true | |
| default: 'main' | |
| type: string | |
| test_timeout: | |
| description: 'Test timeout in minutes' | |
| required: false | |
| default: '15' | |
| type: string | |
| push: | |
| branches: [ main, develop ] | |
| paths: | |
| - 'packages/**' | |
| - 'e2e/**' | |
| pull_request: | |
| branches: [ main, develop ] | |
| paths: | |
| - 'packages/**' | |
| - 'e2e/**' | |
| jobs: | |
| build-and-test: | |
| name: Build Packages and Run E2E Tests | |
| runs-on: ubuntu-latest | |
| timeout-minutes: ${{ fromJson(github.event.inputs.test_timeout || '15') }} | |
| steps: | |
| - name: Display workflow inputs | |
| run: | | |
| echo "Starting E2E Local Dist Tests" | |
| echo "Branch: ${{ github.event.inputs.branch || github.ref_name }}" | |
| echo "Test timeout: ${{ github.event.inputs.test_timeout || '15' }} minutes" | |
| echo "Triggered by: ${{ github.event_name }}" | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| with: | |
| ref: ${{ github.event.inputs.branch || github.ref }} | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: '20.19.5' | |
| cache: 'npm' | |
| - name: Install main dependencies | |
| run: npm ci | |
| - name: Build packages | |
| run: npm run build | |
| - name: Set up e2e apps (local builds) | |
| run: node scripts/e2e-setup.mjs local | |
| - name: Start host app | |
| working-directory: e2e/host-app | |
| run: | | |
| PORT=3000 npm start & | |
| HOST_PID=$! | |
| echo "HOST_PID=$HOST_PID" >> $GITHUB_ENV | |
| - name: Start guest app (port 3002) | |
| working-directory: e2e/guest-app | |
| run: | | |
| PORT=3002 npm start & | |
| GUEST_PID=$! | |
| echo "GUEST_PID=$GUEST_PID" >> $GITHUB_ENV | |
| - name: Start second guest app (port 3003) | |
| working-directory: e2e/guest-app | |
| run: | | |
| PORT=3003 npm start & | |
| GUEST2_PID=$! | |
| echo "GUEST2_PID=$GUEST2_PID" >> $GITHUB_ENV | |
| - name: Wait for applications to be ready | |
| run: | | |
| echo "Waiting for applications to start..." | |
| sleep 15 | |
| echo "Installing wait-on globally..." | |
| npm install -g wait-on | |
| echo "Waiting for servers to respond..." | |
| wait-on http://localhost:3000 http://localhost:3002 http://localhost:3003 --timeout 180000 --interval 3000 | |
| echo "All applications are ready!" | |
| - name: Verify applications are responding | |
| run: | | |
| wget --spider --quiet http://localhost:3000 && echo "Host app responding" || echo "Host app not responding" | |
| wget --spider --quiet http://localhost:3002 && echo "Guest app (3002) responding" || echo "Guest app (3002) not responding" | |
| wget --spider --quiet http://localhost:3003 && echo "Guest app (3003) responding" || echo "Guest app (3003) not responding" | |
| - name: Run E2E tests | |
| working-directory: e2e/tests | |
| timeout-minutes: ${{ fromJson(github.event.inputs.test_timeout || '10') }} | |
| run: npm test | |
| env: | |
| CI: true | |
| BUILD_TYPE: "local-dist" | |
| BRANCH_NAME: ${{ github.event.inputs.branch || github.ref_name }} | |
| WORKFLOW_RUN_ID: ${{ github.run_id }} | |
| - name: Cleanup processes | |
| if: always() | |
| run: | | |
| if [ ! -z "$HOST_PID" ]; then | |
| kill $HOST_PID 2>/dev/null || echo "Host process already stopped" | |
| fi | |
| if [ ! -z "$GUEST_PID" ]; then | |
| kill $GUEST_PID 2>/dev/null || echo "Guest process already stopped" | |
| fi | |
| if [ ! -z "$GUEST2_PID" ]; then | |
| kill $GUEST2_PID 2>/dev/null || echo "Second guest process already stopped" | |
| fi | |
| pkill -f "node.*3000" 2>/dev/null || true | |
| pkill -f "node.*3002" 2>/dev/null || true | |
| pkill -f "node.*3003" 2>/dev/null || true | |
| test-summary: | |
| name: Test Results Summary | |
| runs-on: ubuntu-latest | |
| needs: build-and-test | |
| if: always() | |
| steps: | |
| - name: Report results | |
| run: | | |
| echo "## UIX SDK Local Dist E2E Test Summary" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "### Test Configuration" >> $GITHUB_STEP_SUMMARY | |
| echo "- **Branch**: \`${{ github.event.inputs.branch || github.ref_name }}\`" >> $GITHUB_STEP_SUMMARY | |
| echo "- **Test Timeout**: ${{ github.event.inputs.test_timeout || '15' }} minutes" >> $GITHUB_STEP_SUMMARY | |
| echo "- **Triggered By**: ${{ github.event_name }}" >> $GITHUB_STEP_SUMMARY | |
| echo "- **Run ID**: ${{ github.run_id }}" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| if [ "${{ needs.build-and-test.result }}" == "success" ]; then | |
| echo "**Status**: All tests passed with local dist packages" >> $GITHUB_STEP_SUMMARY | |
| else | |
| echo "**Status**: Tests failed with local dist packages" >> $GITHUB_STEP_SUMMARY | |
| echo "**Next Steps**: Check build logs and test artifacts" >> $GITHUB_STEP_SUMMARY | |
| fi |