Visual regression #55
Workflow file for this run
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: 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: | |
node-version: 20.14.0 | |
cache: 'npm' | |
- name: Install Dependencies | |
run: npm install | |
- name: Build Application | |
run: npm run build | |
- uses: docker/setup-buildx-action@v3 | |
- uses: docker/build-push-action@v5 | |
with: | |
context: . | |
tags: timer-5-tests-ubuntu | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
- 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 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>" |