Skip to content

Fix workflow branch reference for Playwright tests #339

Fix workflow branch reference for Playwright tests

Fix workflow branch reference for Playwright tests #339

Workflow file for this run

name: Knip
permissions:
contents: read
on:
push:
branches: [main]
pull_request:
types: [opened, synchronize, reopened, ready_for_review, labeled]
jobs:
knip:
runs-on: ubuntu-latest
if: github.event_name == 'push' || (github.event.pull_request.draft == false || contains(github.event.pull_request.labels.*.name, 'Run QA checks'))
steps:
- uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
- name: Cache node modules
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-knip-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-knip-${{ env.cache-name }}-
${{ runner.os }}-knip-
${{ runner.os }}-
- name: Install deps
run: |
npm ci
- name: Knip for unused files, dependencies and exports
run: npm run knip