Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split Cypress workflows to relevant PR changes #5871

Merged
merged 4 commits into from
Mar 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions .github/workflows/cypress_admin-ui.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Admin UI Cypress Tests

on:
pull_request:
paths:
- "clients/admin-ui/**"
- ".github/workflows/cypress_admin-ui.yml"
push:
branches:
- "main"
- "release-**"

env:
CI: true

jobs:
Admin-UI-Cypress:
runs-on: ubuntu-latest
defaults:
run:
working-directory: clients
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20.x

- name: Install dependencies
run: npm install

- name: Build FidesJS
working-directory: clients/fides-js
run: npm run build

- name: Cypress Admin UI E2E Tests
uses: cypress-io/github-action@v6
with:
working-directory: clients/admin-ui
install: false
start: npm run cy:start
wait-on: "http://localhost:3000"
wait-on-timeout: 180

- uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-videos-admin-ui
path: /home/runner/work/fides/fides/clients/admin-ui/cypress/videos/*.mp4
52 changes: 52 additions & 0 deletions .github/workflows/cypress_privacy-center.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Privacy Center/FidesJS Cypress Tests

on:
pull_request:
paths:
- "clients/privacy-center/**"
- "clients/fides-js/**"
- ".github/workflows/cypress_privacy-center.yml"
push:
branches:
- "main"
- "release-**"

env:
CI: true

jobs:
Privacy-Center-Cypress:
runs-on: ubuntu-latest
defaults:
run:
working-directory: clients
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20.x

- name: Install dependencies
run: npm install

- name: Build FidesJS
working-directory: clients/fides-js
run: npm run build

- name: Cypress Privacy Center E2E Tests
uses: cypress-io/github-action@v6
with:
working-directory: clients/privacy-center
install: false
start: npm run cy:start
wait-on: "http://localhost:3001"
wait-on-timeout: 180

- uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-videos-privacy-center
path: /home/runner/work/fides/fides/clients/privacy-center/cypress/videos/*.mp4
42 changes: 0 additions & 42 deletions .github/workflows/frontend_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,45 +51,3 @@ jobs:
- name: Unit test (${{ matrix.clients }})
working-directory: clients/${{ matrix.clients }}
run: npm run test:ci

Clients-Cypress:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
clients:
- "admin-ui"
- "privacy-center"
defaults:
run:
working-directory: clients
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

- name: Install dependencies
run: npm install

- name: Build FidesJS
working-directory: clients/fides-js
run: npm run build

- name: Cypress E2E Tests (${{ matrix.clients }})
uses: cypress-io/github-action@v6
with:
working-directory: clients/${{ matrix.clients }}
install: false
start: npm run cy:start
wait-on: "http://localhost:${{ matrix.clients == 'privacy-center' && 3001 || 3000 }}"
wait-on-timeout: 180

- uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-videos-${{ matrix.clients }}
path: /home/runner/work/fides/fides/clients/${{ matrix.clients }}/cypress/videos/*.mp4
Loading