chore(deps): update dependency @types/chrome to ^0.0.300 #259
Workflow file for this run
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: Test | |
on: [pull_request] | |
jobs: | |
security: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: npx lockfile-lint --path package-lock.json --validate-https | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version-file: .nvmrc | |
cache: npm | |
- run: npm install | |
- run: npm test | |
- name: Get Playwright version | |
id: playwright-version | |
# Extract the package version by jq. | |
run: | | |
PLAYWRIGHT_VERSION=$(npm ls @playwright/test --json | jq -r '.dependencies["@playwright/test"].version') | |
echo "PLAYWRIGHT_VERSION=${PLAYWRIGHT_VERSION}" >> $GITHUB_OUTPUT | |
- name: Setup Playwright Browsers cache for Playwright's Version | |
uses: actions/cache@v4 | |
id: playwright-browsers-cache | |
with: | |
# The location of the browsers depends on the OS. | |
# See: https://playwright.dev/docs/browsers#managing-browser-binaries | |
path: ~/.cache/ms-playwright | |
key: ${{ runner.os }}-playwright-browsers-for-${{ steps.playwright-version.outputs.PLAYWRIGHT_VERSION }} | |
- if: ${{ steps.playwright-browsers-cache.outputs.cache-hit != 'true' }} | |
name: Install Playwright Browsers | |
run: npx playwright install --with-deps | |
- name: Run Playwright tests | |
run: npx playwright test --config playwright.config.ts | |
- name: Upload test results | |
if: failure() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: playwright-test-results | |
path: playwright-report | |
retention-days: 1 |