feat(site): mention create-sveltex
#72
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: E2E Visual Regression Testing | |
on: | |
push: | |
branches: [main] | |
paths: | |
- src/** | |
- tests/e2e/** | |
- playwright.config.ts | |
- pnpm-lock.yaml | |
- tsconfig.json | |
- tsconfig.*.json | |
pull_request: | |
branches: [main] | |
permissions: | |
actions: write | |
checks: write | |
contents: write | |
deployments: write | |
discussions: write | |
issues: write | |
packages: write | |
pages: write | |
pull-requests: write | |
repository-projects: write | |
security-events: read | |
statuses: write | |
jobs: | |
test: | |
name: Run Playwright Tests | |
timeout-minutes: 20 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up TeX Live | |
uses: teatimeguest/setup-texlive-action@v3 | |
with: | |
packages: | | |
scheme-basic | |
luatex | |
xetex | |
latexmk | |
dvisvgm | |
standalone | |
pgf | |
microtype | |
mathtools | |
luatex85 | |
lipsum | |
xcolor | |
- uses: pnpm/action-setup@v4 | |
name: Install pnpm | |
with: | |
version: latest | |
run_install: false | |
- name: Install Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
cache: pnpm | |
cache-dependency-path: ./pnpm-lock.yaml | |
- name: Install dependencies | |
run: pnpm install | |
- name: Install Poppler | |
run: sudo apt-get install -y poppler-data poppler-utils | |
- name: Install MuPDF | |
run: sudo apt-get install -y mupdf mupdf-tools | |
# Playwright caching. Adapted from | |
# https://github.com/microsoft/playwright/issues/7249#issuecomment-1385567519 | |
- name: Store Playwright Version | |
run: | | |
PLAYWRIGHT_VERSION=$(pnpm ls @playwright/test | grep @playwright | sed 's|.*playwright/test ||') | |
echo "Playwright Version: $PLAYWRIGHT_VERSION" | |
echo "PLAYWRIGHT_VERSION=$PLAYWRIGHT_VERSION" >> $GITHUB_ENV | |
- name: Cache Playwright Browsers for Playwright's Version | |
id: cache-playwright-browsers | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cache/ms-playwright | |
key: playwright-browsers-${{ env.PLAYWRIGHT_VERSION }} | |
- name: Setup Playwright | |
if: steps.cache-playwright-browsers.outputs.cache-hit != 'true' | |
run: pnpm exec playwright install --with-deps | |
- name: Build SvelTeX | |
run: pnpm build | |
- name: Install Dependencies for Test Project | |
run: pnpm install | |
working-directory: tests/e2e | |
- name: Build Test Project | |
run: pnpm build | |
working-directory: tests/e2e | |
- name: Run Playwright tests | |
run: pnpm playwright | |
- name: Upload Playwright Report | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: playwright-report | |
path: playwright-report/ | |
retention-days: 30 | |
- name: Upload Actual Screenshots | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: actual-screenshots | |
path: tests/e2e/basic.spec.ts-snapshots/ | |
retention-days: 7 |