Skip to content

refactor(28015): Align frontend and backend #1011

refactor(28015): Align frontend and backend

refactor(28015): Align frontend and backend #1011

Workflow file for this run

# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
name: Frontend - Visual Testing (Percy)
on:
pull_request:
branches: [master]
paths:
- hivemq-edge/src/frontend/**
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./hivemq-edge/src/frontend/
strategy:
matrix:
node-version: [18.16.0]
steps:
- name: 👓 Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: 🚚 Setup pnpm
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
with:
version: 8.4.0
- name: 🔻 Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4
with:
node-version: ${{ matrix.node-version }}
- name: 📦 Install dependencies
run: pnpm install
- name: 🏗️ Build Application
run: pnpm run build
- name: 🧪 Run Cypress E2E
uses: cypress-io/github-action@v6
with:
quiet: true
working-directory: ./hivemq-edge/src/frontend/
start: pnpm dev
- name: 🧪 Run Cypress Component
uses: cypress-io/github-action@v6
with:
quiet: true
working-directory: ./hivemq-edge/src/frontend/
component: true
start: pnpm dev
- name: 📸 Run Percy visual tests
run: pnpm cypress:percy
## Percy should block the pipeline except if no money left on the plan :-)
continue-on-error: true
env:
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}