draft: switch taxonomy and dataset endpoints to be non-async
#18504
This file contains hidden or 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: Cypress E2E Tests | |
| on: | |
| push: | |
| branches: | |
| - "main" | |
| - "release-**" | |
| pull_request: | |
| merge_group: | |
| types: [checks_requested] | |
| env: | |
| CI: true | |
| # Docker auth with read-only permissions. | |
| DOCKER_USER: ${{ secrets.DOCKER_USER }} | |
| DOCKER_RO_TOKEN: ${{ secrets.DOCKER_RO_TOKEN }} | |
| DEFAULT_PYTHON_VERSION: "3.10.16" | |
| jobs: | |
| Check-E2E-Changes: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| has_e2e_changes: ${{ steps.filter.outputs.e2e }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Check for E2E file changes | |
| uses: dorny/paths-filter@v3 | |
| id: filter | |
| with: | |
| list-files: shell | |
| filters: | | |
| e2e: | |
| - 'clients/cypress-e2e/**' | |
| - '.github/workflows/cypress_e2e.yml' | |
| - name: Log changed files | |
| if: steps.filter.outputs.e2e == 'true' | |
| run: echo "${{ steps.filter.outputs.e2e_files }}" | |
| Cypress-E2E: | |
| needs: Check-E2E-Changes | |
| if: needs.Check-E2E-Changes.outputs.has_e2e_changes == 'true' | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [20.x] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set Up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ env.DEFAULT_PYTHON_VERSION }} | |
| cache: "pip" | |
| - name: Install Nox | |
| run: pip install nox>=2022 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: Login to Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ env.DOCKER_USER }} | |
| password: ${{ env.DOCKER_RO_TOKEN }} | |
| - name: Start test environment in the background | |
| run: nox -s "fides_env(test)" -- keep_alive | |
| - name: Install dependencies | |
| run: | | |
| cd clients/cypress-e2e | |
| npm ci | |
| - name: Cypress E2E tests | |
| uses: cypress-io/github-action@v6 | |
| with: | |
| working-directory: clients/cypress-e2e | |
| install: false | |
| wait-on: "http://localhost:8080, http://localhost:3001" | |
| record: true | |
| env: | |
| # pass the Cypress Cloud record key as an environment variable | |
| CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} | |
| # pass GitHub token to allow accurately detecting a build vs a re-run build | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Teardown | |
| run: nox -s teardown | |
| - uses: actions/upload-artifact@v4 | |
| if: failure() | |
| with: | |
| name: cypress-videos-cypress-e2e | |
| path: /home/runner/work/fides/fides/clients/cypress-e2e/cypress/videos/*.mp4 | |
| Cypress-E2E-Summary: | |
| runs-on: ubuntu-latest | |
| if: always() | |
| needs: | |
| - Cypress-E2E | |
| steps: | |
| - name: Check job results | |
| run: | | |
| echo "Cypress-E2E: ${{ needs.Cypress-E2E.result }}" | |
| # Fail only if jobs failed (not if skipped) | |
| if [ "${{ needs.Cypress-E2E.result }}" == "failure" ]; then | |
| echo "❌ One or more required jobs failed" | |
| exit 1 | |
| fi | |
| # Check for cancelled jobs (treat as failure) | |
| if [ "${{ needs.Cypress-E2E.result }}" == "cancelled" ]; then | |
| echo "❌ One or more required jobs were cancelled" | |
| exit 1 | |
| fi | |
| echo "✅ All required Cypress E2E checks passed or were skipped" |