🔧 (typescript_test.yml): Add step to get Playwright version and cache Playwright binaries based on the version for better dependency management
🔧 (typescript_test.yml): Update job name to "Run Playwright Tests" for clarity and consistency 🔧 (typescript_test.yml): Remove unnecessary 'ref' input from 'actions/checkout' step
This commit is contained in:
parent
9fb0e929e1
commit
d6998bc9ce
1 changed files with 8 additions and 9 deletions
17
.github/workflows/typescript_test.yml
vendored
17
.github/workflows/typescript_test.yml
vendored
|
|
@ -14,7 +14,7 @@ env:
|
|||
|
||||
jobs:
|
||||
setup-and-test:
|
||||
name: Run Frontend Tests on branch ${{ inputs.branch }}
|
||||
name: Run Playwright Tests
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
|
|
@ -27,8 +27,6 @@ jobs:
|
|||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ inputs.branch }}
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
|
|
@ -50,14 +48,15 @@ jobs:
|
|||
cd src/frontend
|
||||
npm ci
|
||||
if: ${{ steps.setup-node.outputs.cache-hit != 'true' }}
|
||||
|
||||
- name: Cache playwright binaries
|
||||
uses: actions/cache@v4
|
||||
- name: Get Playwright version
|
||||
run: echo "PLAYWRIGHT_VERSION=$(jq '.devDependencies["@playwright/test"]' src/frontend/package.json -r)" >> $GITHUB_ENV
|
||||
- name: Cache Playwright binaries
|
||||
id: playwright-cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
~/.cache/ms-playwright
|
||||
key: ${{ runner.os }}-playwright-${{ hashFiles('src/frontend/package-lock.json') }}
|
||||
path: ~/.cache/ms-playwright
|
||||
key: playwright-browsers-${{ runner.os }}-${{ env.PLAYWRIGHT_VERSION }}
|
||||
|
||||
- name: Install Frontend dependencies
|
||||
run: |
|
||||
cd src/frontend
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue