Skip to content

Visual regression

Visual regression #49

Workflow file for this run

name: CI/CD Pipeline
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build-test-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Adding Node.js
uses: actions/setup-node@v4
with:
cache: 'npm'
- name: Build Docker Image
run: docker build -t timer-5-tests-ubuntu .
- name: Run TestCafe tests in container
run: |
docker run -v ${{ github.workspace }}:/opt/tests -v node_modules_volume:/opt/tests/node_modules timer-5-tests-ubuntu npm run build && npx testcafe chromium:headless --app="npm run serve:ci" -r spec,xunit:e2e/report.xml -c 4
- name: Upload Artifacts
uses: actions/upload-artifact@v4
if: failure()
with:
path: |
e2e/screenshots
e2e/visual-regression-screenshots/*.diff.png
e2e/visual-regression-screenshots/*.current.png
e2e/visual-regression-screenshots/*.reference.png
if-no-files-found: ignore
retention-days: 1
compression-level: 0
overwrite: true
- name: Deploy to Github Pages
if: github.event_name == 'push' && github.ref == 'refs/heads/master' && success()
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
run: |
git remote set-url origin https://git:${GH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
npx gh-pages --nojekyll --dotfiles --dist dist/timer-5 -- -u "github-actions-bot <support+actions@github.com>"