Skip to content

feat: Playwright end-to-end testing best practices #211

feat: Playwright end-to-end testing best practices

feat: Playwright end-to-end testing best practices #211

Workflow file for this run

name: PR Checks
on:
pull_request:
types: [opened, synchronize, closed]
branches:
- main
# Cancel in-progress runs on new pushes
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v5
- name: Set up Node.js
uses: actions/setup-node@v5
with:
node-version: '22'
- run: npm ci
- name: Run lint
run: npm run lint
test:
permissions:
contents: read
runs-on: ${{matrix.os}}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
fail-fast: false
steps:
- uses: actions/checkout@v5
- name: Set up Node.js
uses: actions/setup-node@v5
with:
node-version: '22'
- run: npm ci
- name: Run tests
run: npm run test:ci
comment:
runs-on: ubuntu-latest
permissions:
pull-requests: write
contents: read
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install GitHub CLI
run: sudo apt-get install gh
- name: Add commit messages to PR description
run: |
# Get the commit messages from the PR
commits=$(gh pr view ${{ github.event.pull_request.number }} --json commits | jq -r '.commits[] | [.messageHeadline + .messageBody] | join("\n")' )
# Update the PR description
gh pr edit ${{ github.event.pull_request.number }} --body "$commits"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
description: ${{ github.event.pull_request.body }}