feat(playwright): setup #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Setup Workspace | ||
on: | ||
workflow_call: | ||
outputs: | ||
cache-hit: | ||
description: 'Indicates if cache was restored successfully' | ||
jobs: | ||
setup: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
cache-hit: ${{ steps.cache-deps.outputs.cache-hit }} | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v4 | ||
- name: Install PNPM | ||
uses: pnpm/action-setup@v4 | ||
with: | ||
version: 8.6.3 | ||
run_install: false | ||
- name: Install Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20.18.0 | ||
cache: 'pnpm' | ||
- name: Cache PNPM Store | ||
id: cache-deps | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/.pnpm-store | ||
key: pnpm-store-${{ hashFiles('pnpm-lock.yaml') }} | ||
restore-keys: | | ||
pnpm-store- | ||
- name: Install Dependencies (cache missing) | ||
if: steps.cache-deps.outputs.cache-hit != 'true' | ||
run: pnpm install --frozen-lockfile --prefer-offline --config.ignore-scripts=true | ||
outputs: | ||
cache-hit: ${{ steps.cache-deps.outputs.cache-hit }} |