Skip to content

feat: add backstop js test #34

feat: add backstop js test

feat: add backstop js test #34

Workflow file for this run

name: Backstop test
on:
push:
branches:
- main
pull_request:
branches:
- main
permissions:
contents: read
jobs:
backstop-tests:
name: Visual regression tests
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
persist-credentials: false
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Install dependencies
run: |
npm install ci
npx playwright install
- name: Install xvfb
run: sudo apt-get install -y xvfb pandoc
- name: Build documentation
run: |
pip install -e .[doc]
xvfb-run make -C doc html
- name: Serve documentation
run: npx http-server -u -p 8000 ./doc/_build/html &
- name: check if server is up
run: curl -I http://localhost:8000 || true
- name: Run BackstopJS tests
run: |
npm run test
- name: Upload Backstop report (if failed)
if: failure()
uses: actions/upload-artifact@v4
with:
name: backstop-report
path: backstop_data/html_report