Skip to content

sass: _typography: Enable auto-phrase for Japanese text wrapping #325

sass: _typography: Enable auto-phrase for Japanese text wrapping

sass: _typography: Enable auto-phrase for Japanese text wrapping #325

name: Visual Regression Test
on:
pull_request
jobs:
vrt:
runs-on: ubuntu-latest
permissions:
contents: read
env:
ZOLA_VERSION: "0.22.0"
ZOLA_BIN: ${{ github.workspace }}/zola
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Zola ${{ env.ZOLA_VERSION }}
run: |
curl -sL "https://github.com/getzola/zola/releases/download/v${ZOLA_VERSION}/zola-v${ZOLA_VERSION}-x86_64-unknown-linux-gnu.tar.gz" | tar -xz
$ZOLA_BIN --version
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Install Playwright test runner
working-directory: test
run: |
npm install
npm ls
- name: Install Playwright browser modules and dependecies
working-directory: test
run: npx playwright install --with-deps
- name: Checkout base commit
run: git checkout ${{ github.event.pull_request.base.sha }}
- name: Get copies of test files from the PR to base branch
run: |
git checkout ${{ github.event.pull_request.head.sha }} -- test/
- name: Build base site
run: |
"$ZOLA_BIN" build --base-url "http://127.0.0.1:1111"
- name: Generate base snapshots
working-directory: test
run: |
npx playwright test tests/visual-regression-test.spec.ts --update-snapshots
- name: Checkout PR head
run: git checkout ${{ github.event.pull_request.head.sha }}
- name: Build PR site
run: |
"$ZOLA_BIN" build --base-url "http://127.0.0.1:1111"
- name: Run visual regression test
working-directory: test
run: npx playwright test tests/visual-regression-test.spec.ts
id: vrt-test
- name: Upload VRT results
if: ${{ always() }}
id: upload-vrt
uses: actions/upload-artifact@v4
with:
path: |
test/test-results/
test/playwright-report/
retention-days: 30
- name: Show artifact URL
if: ${{ always() }}
run: |
echo "Artifact URL: ${{ steps.upload-vrt.outputs.artifact-url }}"
tee -a "$GITHUB_STEP_SUMMARY" <<'EOF'
## Visual Regression Test Artifacts
- [Download VRT artifact](${{ steps.upload-vrt.outputs.artifact-url }})
Once downloaded, unpack it, then run the following command to see the results
```
npx playwright show-report ~/Downloads/artifact/playwright-report
```
See [`doc/develop.md`](https://github.com/spacecubics/www/blob/main/doc/develop.md) for more details
EOF