Anotha one

pull/7267/head
zomars 2023-02-20 18:43:59 -07:00
parent 2958c17ebb
commit eaa1210d13
4 changed files with 27 additions and 22 deletions

View File

@ -1,15 +1,10 @@
name: Install playwright binaries name: Cache playwright binaries
description: "Install playwright, cache and restore if necessary" description: "Cache playwright or restore if necessary"
inputs:
node_version:
required: true
description: "The node version used to run this"
runs: runs:
using: "composite" using: "composite"
steps: steps:
- name: Cache playwright binaries - name: Cache playwright binaries
uses: actions/cache@v2 uses: actions/cache@v2
id: playwright-cache
with: with:
path: | path: |
~/Library/Caches/ms-playwright ~/Library/Caches/ms-playwright
@ -17,7 +12,3 @@ runs:
${{ github.workspace }}/node_modules/playwright ${{ github.workspace }}/node_modules/playwright
key: cache-playwright-${{ hashFiles('**/yarn.lock') }} key: cache-playwright-${{ hashFiles('**/yarn.lock') }}
restore-keys: cache-playwright- restore-keys: cache-playwright-
- name: Install playwright deps
if: steps.playwright-cache.outputs.cache-hit != 'true'
shell: bash
run: yarn playwright install

View File

@ -0,0 +1,10 @@
name: Dangerous git Checkout
description: "Git Checkout from PR code so we can run checks from forks"
runs:
using: "composite"
steps:
- name: Checkout repo
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }} #
fetch-depth: 2

View File

@ -0,0 +1,11 @@
name: Install playwright binaries
description: "Install playwright, cache and restore if necessary"
runs:
using: "composite"
steps:
- uses: ./.github/actions/cache-playwright
id: playwright-cache
- name: Yarn install
shell: bash
if: steps.playwright-cache.outputs.cache-hit != 'true'
run: yarn playwright install

View File

@ -64,20 +64,13 @@ jobs:
- 5432:5432 - 5432:5432
steps: steps:
- name: Checkout repo - uses: ./.github/actions/dangerous-git-checkout
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }} # So we can test on forks
fetch-depth: 2
- run: echo 'NODE_OPTIONS="--max_old_space_size=4096"' >> $GITHUB_ENV - run: echo 'NODE_OPTIONS="--max_old_space_size=4096"' >> $GITHUB_ENV
- name: Use Node 16.x - uses: ./.github/actions/yarn-install
uses: actions/setup-node@v3
with: with:
node-version: 16.x node_version: ${{ secrets.node_version }}
cache: "yarn" - uses: ./.github/actions/yarn-playwright-install
- uses: ./.github/actions/cache-playwright
- run: yarn test-e2e - run: yarn test-e2e
- name: Upload test results - name: Upload test results
if: ${{ always() }} if: ${{ always() }}
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2