diff --git a/.github/workflows/cypress_admin-ui.yml b/.github/workflows/cypress_admin-ui.yml new file mode 100644 index 0000000000..3618838b3e --- /dev/null +++ b/.github/workflows/cypress_admin-ui.yml @@ -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 diff --git a/.github/workflows/cypress_privacy-center.yml b/.github/workflows/cypress_privacy-center.yml new file mode 100644 index 0000000000..5e320a89c5 --- /dev/null +++ b/.github/workflows/cypress_privacy-center.yml @@ -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 diff --git a/.github/workflows/frontend_checks.yml b/.github/workflows/frontend_checks.yml index bb12881bda..741f39321d 100644 --- a/.github/workflows/frontend_checks.yml +++ b/.github/workflows/frontend_checks.yml @@ -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