Skip to content

Commit

Permalink
Skip Playwright downloads by default to speed up CI (#813)
Browse files Browse the repository at this point in the history
  • Loading branch information
kachkaev authored Jul 15, 2022
1 parent 4cdadb5 commit e248d06
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
12 changes: 12 additions & 0 deletions .github/actions/warm-up-repo/action.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
name: Warm-up repo
description: Prepares Node and Yarn dependencies

inputs:
playwright-deps:
default: ""
description: "List of browsers separated by space, e.g. 'chrome firefox'"
required: false

runs:
using: composite
steps:
Expand All @@ -11,3 +17,9 @@ runs:

- run: yarn install
shell: bash
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: ${{ inputs.playwright-deps == '' }}

- run: yarn playwright install-deps ${{ inputs.playwright-deps }}
if: ${{ inputs.playwright-deps != '' }}
shell: bash
5 changes: 2 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,8 @@ jobs:
${{ runner.os }}-frontend-next-cache
- uses: ./.github/actions/warm-up-repo
with:
playwright-deps: chrome firefox

- name: Create temp files and folders
run: |
Expand Down Expand Up @@ -221,9 +223,6 @@ jobs:
yarn workspace @hashintel/hash-frontend start 2>&1 | tee var/logs/frontend.log & ## ampersand enables background mode
yarn wait-on --timeout 30000 http://0.0.0.0:3000
- run: yarn playwright install-deps chrome firefox
if: ${{ success() || failure() }}

- name: Run Playwright tests
if: ${{ success() || failure() }}
run: |
Expand Down

0 comments on commit e248d06

Please sign in to comment.