Skip to content

Merge pull request #155 from LibreSign/dependabot/npm_and_yarn/typesc… #154

Merge pull request #155 from LibreSign/dependabot/npm_and_yarn/typesc…

Merge pull request #155 from LibreSign/dependabot/npm_and_yarn/typesc… #154

Workflow file for this run

# SPDX-FileCopyrightText: 2026 LibreCode coop and contributors
# SPDX-License-Identifier: AGPL-3.0-or-later
name: Playwright
on:
pull_request:
push:
branches:
- main
permissions:
contents: read
concurrency:
group: playwright-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
e2e:
runs-on: ubuntu-latest
name: Playwright e2e
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Read package.json node and npm engines version
uses: skjnldsv/read-package-engines-version-actions@06d6db44aa62f4609ba070f556ec24bc99fb85cb # v4
id: versions
with:
fallbackNode: '^24'
fallbackNpm: '^11'
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: ${{ steps.versions.outputs.nodeVersion }}
- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
run: npm i -g 'npm@${{ steps.versions.outputs.npmVersion }}'
- name: Install dependencies
env:
CYPRESS_INSTALL_BINARY: 0
PUPPETEER_SKIP_DOWNLOAD: true
run: npm ci
- name: Install Playwright browser
run: npx playwright install --with-deps chromium
- name: Run Playwright tests
run: npm run test:e2e
- name: Upload Playwright report
if: ${{ !cancelled() }}
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: playwright-report
path: |
playwright-report/
test-results/
retention-days: 7
screenshot-container:
runs-on: ubuntu-latest
name: Screenshot check in container
container:
image: mcr.microsoft.com/playwright:v1.63.0-noble
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install dependencies
run: npm ci
- name: Check README screenshot
run: npm run screenshots:check
- name: Upload screenshot artifacts
if: ${{ failure() }}
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: screenshot-diff
path: test-results/
if-no-files-found: ignore
retention-days: 7