Skip to content

Commit

Permalink
split up matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
etrepum committed May 5, 2024
1 parent a9e6d1c commit de1ad4c
Show file tree
Hide file tree
Showing 2 changed files with 132 additions and 10 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/nightly-release.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: Nightly Release Branch
on:
# remove the [] when this is turned on
schedule:
[]
# Run daily at 2:30am UTC
# - cron: '30 2 * * 1-5'
[]
# Run daily at 2:30am UTC
# schedule:
# - cron: '30 2 * * 1-5'
jobs:
release:
# prevents this action from running on forks
Expand Down
134 changes: 128 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,79 @@ jobs:
events-mode: ['legacy-events', 'modern-events']
test-prefix: ['test-e2e-']
include:
- browser: chromium
events-mode: modern-events
os: macos-latest
test-prefix: test-e2e-prod
- events-mode: modern-events
editor-mode: rich-text-with-collab
- os: macos-latest
browser: webkit
- os: macos-latest
playwright-cache: |
~/Library/Caches/ms-playwright
test-results: |
test-results/
- os: windows-latest
playwright-cache: |
C:\Users\runneradmin\AppData\Local\ms-playwright
test-results: |
~/.npm/_logs/
- os: ubuntu-latest
playwright-cache: |
~/.cache/ms-playwright
test-results: |
test-results/
runs-on: ${{ matrix.os }}
env:
CI: true
E2E_EDITOR_MODE: ${{ matrix.editor-mode }}
E2E_EVENTS_MODE: ${{ matrix.events-mode }}
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: npm
- name: Install required ubuntu-latest packages
if: matrix.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: ${{ matrix.playwright-cache }}
key: playwright-${{ matrix.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: ${{ matrix.playwright-cache }}
key: ${{ steps.playwright-cache.outputs.cache-primary-key }}
- name: Run tests
run: npm run ${{ matrix.test-prefix }}${{ matrix.editor-mode == 'rich-text-with-collab' && 'collab-' || '' }}ci-${{ matrix.browser }}
- name: Upload Artifacts
if: failure()
uses: actions/upload-artifact@v4
with:
name: Test Results
path: ${{ matrix.test-results }}
retention-days: 7

e2e-collab:
if: github.repository_owner == 'facebook'
strategy:
matrix:
os: ['macos-latest', 'ubuntu-latest', 'windows-latest']
node-version: [18.18.0]
browser: ['chromium', 'firefox']
editor-mode: ['rich-text-with-collab']
events-mode: ['modern-events']
test-prefix: ['test-e2e-']
include:
- os: macos-latest
browser: webkit
- os: macos-latest
playwright-cache: |
~/Library/Caches/ms-playwright
Expand Down Expand Up @@ -151,3 +218,58 @@ jobs:
name: Test Results
path: ${{ matrix.test-results }}
retention-days: 7

e2e-prod:
if: github.repository_owner == 'facebook'
strategy:
matrix:
os: ['macos-latest']
node-version: [18.18.0]
browser: ['chromium']
editor-mode: ['rich-text', 'plain-text', 'rich-text-with-collab']
events-mode: ['modern-events']
test-prefix: ['test-e2e-prod']
include:
- os: macos-latest
playwright-cache: |
~/Library/Caches/ms-playwright
test-results: |
test-results/
browser: webkit
runs-on: ${{ matrix.os }}
env:
CI: true
E2E_EDITOR_MODE: ${{ matrix.editor-mode }}
E2E_EVENTS_MODE: ${{ matrix.events-mode }}
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: npm
- name: Install dependencies
run: npm ci
- name: Restore playwright from cache
uses: actions/cache/restore@v4
id: playwright-cache
with:
path: ${{ matrix.playwright-cache }}
key: playwright-${{ matrix.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: ${{ matrix.playwright-cache }}
key: ${{ steps.playwright-cache.outputs.cache-primary-key }}
- name: Run tests
run: npm run ${{ matrix.test-prefix }}${{ matrix.editor-mode == 'rich-text-with-collab' && 'collab-' || '' }}ci-${{ matrix.browser }}
- name: Upload Artifacts
if: failure()
uses: actions/upload-artifact@v4
with:
name: Test Results
path: ${{ matrix.test-results }}
retention-days: 7

0 comments on commit de1ad4c

Please sign in to comment.