Skip to content

Commit

Permalink
e2e with beta
Browse files Browse the repository at this point in the history
  • Loading branch information
etrepum committed May 7, 2024
1 parent 38ab551 commit 94c4c78
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 2 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
editor-mode: {required: true, type: string}
events-mode: {required: true, type: string}
prod: {required: false, type: boolean}
react-override: {required: false, type: string}

jobs:
e2e-tests:
Expand All @@ -35,6 +36,12 @@ jobs:
sudo apt-get install xvfb
- name: Install dependencies
run: npm ci
- name: Override React ${{ inputs.react-override }}
if: inputs.react-override != ''
# This should be safe since we are caching ~/.npm and not node_modules
run: |
npm i --no-save react@${{ inputs.react-override }} react-dom@${{ inputs.react-override }}
grep version node_modules/{react,react-dom}/package.json
- name: Restore playwright from cache
uses: actions/cache/restore@v4
id: playwright-cache
Expand All @@ -55,6 +62,6 @@ jobs:
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 }}
name: Test Results ${{ inputs.os }}-${{ inputs.browser }}-${{ inputs.editor-mode }}-${{ inputs.events-mode }}-${{ inputs.prod && 'prod' || 'dev' }}-${{ inputs.node-version }}-${{ inputs.react-override }}
path: ${{ env.test_results_path }}
retention-days: 7
21 changes: 20 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ jobs:
- name: Override React ${{ matrix.react-override }}
if: matrix.react-override != ''
# This should be safe since we are caching ~/.npm and not node_modules
run: npm i --no-save react@${{ matrix.react-override }} react-dom@${{ matrix.react-override }}
run: |
npm i --no-save react@${{ matrix.react-override }} react-dom@${{ matrix.react-override }}
grep version node_modules/{react,react-dom}/package.json
- run: npm run test-unit

integration:
Expand All @@ -81,6 +83,23 @@ jobs:
run: npm ci
- run: npm run test-integration

e2e-react-beta:
if: github.repository_owner == 'facebook'
strategy:
matrix:
editor-mode: ['rich-text', 'rich-text-with-collab']
prod: [false, true]
react-override: ['beta']
uses: ./.github/workflows/e2e-test.yml
with:
os: 'macos-latest'
browser: 'chromium'
node-version: 18.18.0
events-mode: 'modern-events'
editor-mode: ${{ matrix.editor-mode }}
prod: ${{ matrix.prod }}
react-override: ${{ matrix.react-override }}

e2e-mac:
if: github.repository_owner == 'facebook'
strategy:
Expand Down

0 comments on commit 94c4c78

Please sign in to comment.