From 0caf03e34f3e61108cb27e74f390259277423448 Mon Sep 17 00:00:00 2001 From: Nicolas Gallagher Date: Sat, 11 May 2024 19:15:31 -0700 Subject: [PATCH] Temporarily mock out e2e test workflow --- .github/workflows/call-e2e-test.yml | 92 ++++++++++++++++------------- 1 file changed, 52 insertions(+), 40 deletions(-) diff --git a/.github/workflows/call-e2e-test.yml b/.github/workflows/call-e2e-test.yml index 48e14617237..91f221538d0 100644 --- a/.github/workflows/call-e2e-test.yml +++ b/.github/workflows/call-e2e-test.yml @@ -12,49 +12,61 @@ on: jobs: e2e-test: - runs-on: ${{ inputs.os }} - if: (inputs.browser != 'webkit' || inputs.os == 'macos-latest') && (inputs.editor-mode != 'rich-text-with-collab' || inputs.events-mode != 'legacy-events') - env: - CI: true - E2E_EDITOR_MODE: ${{ inputs.editor-mode }} - E2E_EVENTS_MODE: ${{ inputs.events-mode }} - cache_playwright_path: ${{ inputs.os == 'macos-latest' && '~/Library/Caches/ms-playwright' || inputs.os == 'windows-latest' && 'C:\Users\runneradmin\AppData\Local\ms-playwright' || '~/.cache/ms-playwright' }} - test_results_path: ${{ inputs.os == 'windows-latest' && '~/.npm/_logs/' || 'test-results/' }} - test_script: test-e2e-${{ inputs.editor-mode == 'rich-text-with-collab' && 'collab-' || '' }}${{ inputs.prod && 'prod-' || '' }}ci-${{ inputs.browser }} + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Use Node.js ${{ inputs.node-version }} + - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v4 with: - node-version: ${{ inputs.node-version }} + node-version: ${{ matrix.node-version }} cache: npm - - name: Install required ubuntu-latest packages - if: inputs.os == 'ubuntu-latest' + - name: Mock e2e test run: | - sudo apt-get update - sudo apt-get install xvfb - - name: Install dependencies - run: npm ci - - name: Restore playwright from cache - uses: actions/cache/restore@v4 - id: playwright-cache - with: - path: ${{ env.cache_playwright_path }} - key: playwright-${{ inputs.node-version }}-${{ runner.os }}-${{ runner.arch }}-v${{ secrets.CACHE_VERSION }}-${{ hashFiles('package-lock.json') }} - - name: Install playwright - run: npx playwright install - - name: Save playwright to cache - uses: actions/cache/save@v4 - if: steps.playwright-cache.outputs.cache-hit != 'true' - with: - path: ${{ env.cache_playwright_path }} - key: ${{ steps.playwright-cache.outputs.cache-primary-key }} - - name: Run tests - run: npm run ${{ env.test_script }} - - name: Upload Artifacts - if: failure() - uses: actions/upload-artifact@v4 - with: - name: Test Results ${{ inputs.os }}-${{ inputs.browser }}-${{ inputs.editor-mode }}-${{ inputs.events-mode }}-${{ inputs.prod && 'prod' || 'dev' }}-${{ inputs.node-version }} - path: ${{ env.test_results_path }} - retention-days: 7 + echo ${{ inputs.os }}-${{ inputs.browser }}-${{ inputs.editor-mode }}-${{ inputs.events-mode }}-${{ inputs.prod && 'prod' || 'dev' }}-${{ inputs.node-version }} + + #runs-on: ${{ inputs.os }} + #if: (inputs.browser != 'webkit' || inputs.os == 'macos-latest') && (inputs.editor-mode != 'rich-text-with-collab' || inputs.events-mode != 'legacy-events') + #env: + # CI: true + # E2E_EDITOR_MODE: ${{ inputs.editor-mode }} + # E2E_EVENTS_MODE: ${{ inputs.events-mode }} + # cache_playwright_path: ${{ inputs.os == 'macos-latest' && '~/Library/Caches/ms-playwright' || inputs.os == 'windows-latest' && 'C:\Users\runneradmin\AppData\Local\ms-playwright' || '~/.cache/ms-playwright' }} + # test_results_path: ${{ inputs.os == 'windows-latest' && '~/.npm/_logs/' || 'test-results/' }} + # test_script: test-e2e-${{ inputs.editor-mode == 'rich-text-with-collab' && 'collab-' || '' }}${{ inputs.prod && 'prod-' || '' }}ci-${{ inputs.browser }} + #steps: + # - uses: actions/checkout@v4 + # - name: Use Node.js ${{ inputs.node-version }} + # uses: actions/setup-node@v4 + # with: + # node-version: ${{ inputs.node-version }} + # cache: npm + # - name: Install required ubuntu-latest packages + # if: inputs.os == 'ubuntu-latest' + # run: | + # sudo apt-get update + # sudo apt-get install xvfb + # - name: Install dependencies + # run: npm ci + # - name: Restore playwright from cache + # uses: actions/cache/restore@v4 + # id: playwright-cache + # with: + # path: ${{ env.cache_playwright_path }} + # key: playwright-${{ inputs.node-version }}-${{ runner.os }}-${{ runner.arch }}-v${{ secrets.CACHE_VERSION }}-${{ hashFiles('package-lock.json') }} + # - name: Install playwright + # run: npx playwright install + # - name: Save playwright to cache + # uses: actions/cache/save@v4 + # if: steps.playwright-cache.outputs.cache-hit != 'true' + # with: + # path: ${{ env.cache_playwright_path }} + # key: ${{ steps.playwright-cache.outputs.cache-primary-key }} + # - name: Run tests + # run: npm run ${{ env.test_script }} + # - name: Upload Artifacts + # if: failure() + # uses: actions/upload-artifact@v4 + # with: + # name: Test Results ${{ inputs.os }}-${{ inputs.browser }}-${{ inputs.editor-mode }}-${{ inputs.events-mode }}-${{ inputs.prod && 'prod' || 'dev' }}-${{ inputs.node-version }} + # path: ${{ env.test_results_path }} + # retention-days: 7