Abstract playwright cache
parent
e92ad12b54
commit
f82833cfdb
|
@ -0,0 +1,23 @@
|
||||||
|
name: Install playwright binaries
|
||||||
|
description: "Install playwright, cache and restore if necessary"
|
||||||
|
inputs:
|
||||||
|
node_version:
|
||||||
|
required: true
|
||||||
|
description: "The node version used to run this"
|
||||||
|
runs:
|
||||||
|
using: "composite"
|
||||||
|
steps:
|
||||||
|
- name: Cache playwright binaries
|
||||||
|
uses: actions/cache@v2
|
||||||
|
id: playwright-cache
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/Library/Caches/ms-playwright
|
||||||
|
~/.cache/ms-playwright
|
||||||
|
${{ github.workspace }}/node_modules/playwright
|
||||||
|
key: cache-playwright-${{ hashFiles('**/yarn.lock') }}
|
||||||
|
restore-keys: cache-playwright-
|
||||||
|
- name: Install playwright deps
|
||||||
|
if: steps.playwright-cache.outputs.cache-hit != 'true'
|
||||||
|
shell: bash
|
||||||
|
run: yarn playwright install
|
|
@ -76,21 +76,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node }}
|
node-version: ${{ matrix.node }}
|
||||||
cache: "yarn"
|
cache: "yarn"
|
||||||
|
- uses: ./.github/actions/cache-playwright
|
||||||
- name: Cache playwright binaries
|
|
||||||
uses: actions/cache@v2
|
|
||||||
id: playwright-cache
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/Library/Caches/ms-playwright
|
|
||||||
~/.cache/ms-playwright
|
|
||||||
${{ github.workspace }}/node_modules/playwright
|
|
||||||
key: cache-playwright-${{ hashFiles('**/yarn.lock') }}
|
|
||||||
restore-keys: cache-playwright-
|
|
||||||
- run: yarn --frozen-lockfile
|
|
||||||
- name: Install playwright deps
|
|
||||||
if: steps.playwright-cache.outputs.cache-hit != 'true'
|
|
||||||
run: yarn playwright install --with-deps
|
|
||||||
- name: Run Tests
|
- name: Run Tests
|
||||||
run: yarn test-e2e:app-store
|
run: yarn test-e2e:app-store
|
||||||
|
|
||||||
|
|
|
@ -72,21 +72,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
node-version: 16.x
|
node-version: 16.x
|
||||||
cache: "yarn"
|
cache: "yarn"
|
||||||
|
- uses: ./.github/actions/cache-playwright
|
||||||
- name: Cache playwright binaries
|
|
||||||
uses: actions/cache@v2
|
|
||||||
id: playwright-cache
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/Library/Caches/ms-playwright
|
|
||||||
~/.cache/ms-playwright
|
|
||||||
${{ github.workspace }}/node_modules/playwright
|
|
||||||
key: cache-playwright-${{ hashFiles('**/yarn.lock') }}
|
|
||||||
restore-keys: cache-playwright-
|
|
||||||
- run: yarn --frozen-lockfile
|
|
||||||
- name: Install playwright deps
|
|
||||||
if: steps.playwright-cache.outputs.cache-hit != 'true'
|
|
||||||
run: yarn playwright install --with-deps
|
|
||||||
- name: Run Tests
|
- name: Run Tests
|
||||||
run: yarn turbo run embed-tests-update-snapshots:ci --scope=@calcom/embed-react --concurrency=1
|
run: yarn turbo run embed-tests-update-snapshots:ci --scope=@calcom/embed-react --concurrency=1
|
||||||
|
|
||||||
|
|
|
@ -75,21 +75,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
node-version: 16.x
|
node-version: 16.x
|
||||||
cache: "yarn"
|
cache: "yarn"
|
||||||
|
- uses: ./.github/actions/cache-playwright
|
||||||
- name: Cache playwright binaries
|
|
||||||
uses: actions/cache@v2
|
|
||||||
id: playwright-cache
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/Library/Caches/ms-playwright
|
|
||||||
~/.cache/ms-playwright
|
|
||||||
${{ github.workspace }}/node_modules/playwright
|
|
||||||
key: cache-playwright-${{ hashFiles('**/yarn.lock') }}
|
|
||||||
restore-keys: cache-playwright-
|
|
||||||
- run: yarn --frozen-lockfile
|
|
||||||
- name: Install playwright deps
|
|
||||||
if: steps.playwright-cache.outputs.cache-hit != 'true'
|
|
||||||
run: yarn playwright install --with-deps
|
|
||||||
- run: yarn test-e2e
|
- run: yarn test-e2e
|
||||||
|
|
||||||
- name: Upload test results
|
- name: Upload test results
|
||||||
|
|
|
@ -65,19 +65,7 @@ jobs:
|
||||||
- uses: ./.github/actions/yarn-install
|
- uses: ./.github/actions/yarn-install
|
||||||
with:
|
with:
|
||||||
node_version: ${{ secrets.node_version }}
|
node_version: ${{ secrets.node_version }}
|
||||||
- name: Cache playwright binaries
|
- uses: ./.github/actions/cache-playwright
|
||||||
uses: actions/cache@v2
|
|
||||||
id: playwright-cache
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/Library/Caches/ms-playwright
|
|
||||||
~/.cache/ms-playwright
|
|
||||||
${{ github.workspace }}/node_modules/playwright
|
|
||||||
key: cache-playwright-${{ hashFiles('**/yarn.lock') }}
|
|
||||||
restore-keys: cache-playwright-
|
|
||||||
- name: Install playwright deps
|
|
||||||
if: steps.playwright-cache.outputs.cache-hit != 'true'
|
|
||||||
run: yarn playwright install
|
|
||||||
- uses: ./.github/actions/yarn-build
|
- uses: ./.github/actions/yarn-build
|
||||||
with:
|
with:
|
||||||
# GitHub Composite actions cannot read secrets, we have to pass them in here
|
# GitHub Composite actions cannot read secrets, we have to pass them in here
|
||||||
|
|
Loading…
Reference in New Issue