mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2026-02-06 19:02:24 +00:00
* feat: Add e2e test documentation site with generation scripts and VitePress configuration. * feat: migrate e2e documentation generation to Playwright and update service entity permission tests. * docs: Improve Playwright E2E test documentation with JSDoc comments and update doc generation. * docs: Add link to E2E Test Documentation in README. * fix: Correctly escape backslashes in Playwright generated markdown tables and refine the documentation CI workflow. * minor fix * fix node version issue * minor change
69 lines
2.5 KiB
YAML
69 lines
2.5 KiB
YAML
name: Verify Playwright Documentation
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- 'openmetadata-ui/src/main/resources/ui/playwright/e2e/**/*.spec.ts'
|
|
- 'openmetadata-ui/src/main/resources/ui/playwright/doc-generator/**'
|
|
branches:
|
|
- main
|
|
|
|
permissions:
|
|
contents: write
|
|
pull-requests: write
|
|
|
|
jobs:
|
|
verify-docs:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version-file: 'openmetadata-ui/src/main/resources/ui/.nvmrc'
|
|
cache: 'yarn'
|
|
cache-dependency-path: 'openmetadata-ui/src/main/resources/ui/yarn.lock'
|
|
|
|
- name: Install Dependencies
|
|
working-directory: openmetadata-ui/src/main/resources/ui
|
|
run: yarn install --frozen-lockfile --ignore-scripts
|
|
|
|
- name: Install Playwright Browsers
|
|
# We need browsers installed for 'playwright test --list' to work in some versions,
|
|
# although strictly speaking just listing shouldn't require binaries if configured right.
|
|
# Adding just in case.
|
|
working-directory: openmetadata-ui/src/main/resources/ui
|
|
run: npx playwright install --with-deps
|
|
|
|
- name: Generate Documentation
|
|
working-directory: openmetadata-ui/src/main/resources/ui
|
|
run: node playwright/doc-generator/generate.js
|
|
|
|
- name: Check for Changes
|
|
id: git-check
|
|
run: |
|
|
git diff --exit-code --quiet openmetadata-ui/src/main/resources/ui/playwright/docs || echo "changes=true" >> $GITHUB_OUTPUT
|
|
|
|
- name: Commit and Push Changes
|
|
if: steps.git-check.outputs.changes == 'true'
|
|
run: |
|
|
git config --global user.name 'github-actions[bot]'
|
|
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
|
|
git add openmetadata-ui/src/main/resources/ui/playwright/docs
|
|
git commit -m "docs: auto-generate playwright documentation"
|
|
git push
|
|
|
|
- name: Comment on PR
|
|
if: steps.git-check.outputs.changes == 'true'
|
|
uses: peter-evans/create-or-update-comment@v4
|
|
with:
|
|
issue-number: ${{ github.event.pull_request.number }}
|
|
body: |
|
|
## 📝 Documentation Auto-Updated
|
|
|
|
The Playwright documentation has been automatically updated to match the changes in this PR.
|
|
|
|
* **Generated by**: `playwright-docs-check.yml`
|
|
* **Status**: ✅ Updated and pushed to branch.
|