Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
- name: Install dependencies
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: NPQ_PKG_MGR=yarn npx npq install
run: NPQ_PKG_MGR=yarn npx npq install --immutable

- name: Build
run: yarn build
Expand Down
34 changes: 25 additions & 9 deletions .github/workflows/interact-e2e.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
name: Interact E2E Tests

on:
push:
branches:
- master
workflow_dispatch:
inputs:
branch:
type: string
description: Branch to run tests on
default: master
browser:
type: choice
description: Browser to run tests in
Expand All @@ -11,7 +18,7 @@ on:
- firefox
- webkit
- all
default: webkit
default: all

permissions:
contents: read
Expand All @@ -24,13 +31,16 @@ env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true

jobs:
e2e:
interact-e2e:
name: Interact E2E (${{ github.event.inputs.browser || 'all' }})
runs-on: ubuntu-latest
timeout-minutes: 30

steps:
- name: Checkout repository
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
ref: ${{ github.event.inputs.branch || github.ref }}

- name: Setup Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
Expand Down Expand Up @@ -59,7 +69,7 @@ jobs:
- name: Install dependencies
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: NPQ_PKG_MGR=yarn npx npq install
run: NPQ_PKG_MGR=yarn npx npq install --immutable

- name: Build motion package
run: yarn workspace @wix/motion build
Expand All @@ -72,26 +82,32 @@ jobs:
id: playwright-cache
with:
path: ~/.cache/ms-playwright
key: ${{ runner.os }}-playwright-${{ hashFiles('packages/interact/package.json') }}
key: ${{ runner.os }}-playwright-${{ github.event.inputs.browser || 'all' }}-${{ hashFiles('packages/interact/package.json') }}
restore-keys: |
${{ runner.os }}-playwright-${{ github.event.inputs.browser || 'all' }}-
${{ runner.os }}-playwright-

- name: Install Playwright browsers
if: steps.playwright-cache.outputs.cache-hit != 'true'
- name: Install Playwright browsers (all)
if: steps.playwright-cache.outputs.cache-hit != 'true' && (github.event.inputs.browser == 'all' || github.event.inputs.browser == '')
working-directory: packages/interact
run: npx playwright install --with-deps chromium firefox webkit

- name: Install Playwright browsers (selected)
if: steps.playwright-cache.outputs.cache-hit != 'true' && github.event.inputs.browser != 'all' && github.event.inputs.browser != ''
working-directory: packages/interact
run: npx playwright install --with-deps ${{ github.event.inputs.browser }}

- name: Install Playwright system deps
if: steps.playwright-cache.outputs.cache-hit == 'true'
run: npx playwright install-deps
run: npx playwright install-deps ${{ github.event.inputs.browser != 'all' && github.event.inputs.browser != '' && github.event.inputs.browser || '' }}

- name: Run E2E tests (selected browser)
if: ${{ github.event.inputs.browser != 'all' }}
if: github.event.inputs.browser != 'all' && github.event.inputs.browser != ''
working-directory: packages/interact
run: npx playwright test --project=${{ github.event.inputs.browser }}

- name: Run E2E tests (all browsers)
if: ${{ github.event.inputs.browser == 'all' }}
if: github.event.inputs.browser == 'all' || github.event.inputs.browser == ''
working-directory: packages/interact
run: npx playwright test

Expand Down
34 changes: 25 additions & 9 deletions .github/workflows/motion-e2e.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
name: Motion E2E Tests

on:
push:
branches:
- master
workflow_dispatch:
inputs:
branch:
type: string
description: Branch to run tests on
default: master
browser:
type: choice
description: Browser to run tests in
Expand All @@ -11,7 +18,7 @@ on:
- firefox
- webkit
- all
default: webkit
default: all

permissions:
contents: read
Expand All @@ -24,13 +31,16 @@ env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true

jobs:
e2e:
motion-e2e:
name: Motion E2E (${{ github.event.inputs.browser || 'all' }})
runs-on: ubuntu-latest
timeout-minutes: 30

steps:
- name: Checkout repository
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
ref: ${{ github.event.inputs.branch || github.ref }}

- name: Setup Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
Expand Down Expand Up @@ -59,7 +69,7 @@ jobs:
- name: Install dependencies
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: NPQ_PKG_MGR=yarn npx npq install
run: NPQ_PKG_MGR=yarn npx npq install --immutable

- name: Build motion package
run: yarn workspace @wix/motion build
Expand All @@ -69,25 +79,31 @@ jobs:
id: playwright-cache
with:
path: ~/.cache/ms-playwright
key: ${{ runner.os }}-playwright-${{ hashFiles('packages/motion/package.json') }}
key: ${{ runner.os }}-playwright-${{ github.event.inputs.browser || 'all' }}-${{ hashFiles('packages/motion/package.json') }}
restore-keys: |
${{ runner.os }}-playwright-${{ github.event.inputs.browser || 'all' }}-
${{ runner.os }}-playwright-

- name: Install Playwright browsers
if: steps.playwright-cache.outputs.cache-hit != 'true'
- name: Install Playwright browsers (all)
if: steps.playwright-cache.outputs.cache-hit != 'true' && (github.event.inputs.browser == 'all' || github.event.inputs.browser == '')
working-directory: packages/motion
run: npx playwright install --with-deps chromium firefox webkit

- name: Install Playwright browsers (selected)
if: steps.playwright-cache.outputs.cache-hit != 'true' && github.event.inputs.browser != 'all' && github.event.inputs.browser != ''
working-directory: packages/motion
run: npx playwright install --with-deps ${{ github.event.inputs.browser }}

- name: Install Playwright system deps
if: steps.playwright-cache.outputs.cache-hit == 'true'
run: npx playwright install-deps
run: npx playwright install-deps ${{ github.event.inputs.browser != 'all' && github.event.inputs.browser != '' && github.event.inputs.browser || '' }}

- name: Run E2E tests (selected browser)
if: ${{ github.event.inputs.browser != 'all' }}
if: github.event.inputs.browser != 'all' && github.event.inputs.browser != ''
working-directory: packages/motion
run: npx playwright test --project=${{ github.event.inputs.browser }}

- name: Run E2E tests (all browsers)
if: ${{ github.event.inputs.browser == 'all' }}
if: github.event.inputs.browser == 'all' || github.event.inputs.browser == ''
working-directory: packages/motion
run: npx playwright test
Loading