diff --git a/.github/workflows/e2e.feature.yml b/.github/workflows/e2e.frontend.yaml similarity index 70% rename from .github/workflows/e2e.feature.yml rename to .github/workflows/e2e.frontend.yaml index 3a21bda990..c7eda419f3 100644 --- a/.github/workflows/e2e.feature.yml +++ b/.github/workflows/e2e.frontend.yaml @@ -1,11 +1,16 @@ -name: e2e:feature -# https://docs.github.com/en/actions/reference/events-that-trigger-workflows -on: [ deployment_status ] +name: e2e:frontend +on: [deployment_status] jobs: e2e: - # only runs this job on successful deploy if: github.event_name == 'deployment_status' && github.event.deployment_status.state == 'success' && contains(github.event.deployment_status.target_url, 'unleash-monorepo-frontend') runs-on: ubuntu-latest + strategy: + matrix: + test: + - feature/feature.spec.ts + - groups/groups.spec.ts + - projects/access.spec.ts + - segments/segments.spec.ts steps: - name: Dump GitHub context env: @@ -20,4 +25,4 @@ jobs: working-directory: frontend env: AUTH_USER=admin,AUTH_PASSWORD=unleash4all config: baseUrl=${{ github.event.deployment_status.target_url }} - spec: cypress/integration/feature/feature.spec.ts + spec: cypress/integration/${{ matrix.test }} diff --git a/.github/workflows/e2e.groups.yml b/.github/workflows/e2e.groups.yml deleted file mode 100644 index 3ea3a3f4ff..0000000000 --- a/.github/workflows/e2e.groups.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: e2e:groups -# https://docs.github.com/en/actions/reference/events-that-trigger-workflows -on: [ deployment_status ] -jobs: - e2e: - # only runs this job on successful deploy - if: github.event_name == 'deployment_status' && github.event.deployment_status.state == 'success' && contains(github.event.deployment_status.target_url, 'unleash-monorepo-frontend') - runs-on: ubuntu-latest - steps: - - name: Dump GitHub context - env: - GITHUB_CONTEXT: ${{ toJson(github) }} - run: | - echo "$GITHUB_CONTEXT" - - name: Checkout - uses: actions/checkout@v3 - - name: Run Cypress - uses: cypress-io/github-action@v2 - with: - working-directory: frontend - env: AUTH_USER=admin,AUTH_PASSWORD=unleash4all - config: baseUrl=${{ github.event.deployment_status.target_url }} - spec: cypress/integration/groups/groups.spec.ts diff --git a/.github/workflows/e2e.project-access.yml b/.github/workflows/e2e.project-access.yml deleted file mode 100644 index d7fd78ba17..0000000000 --- a/.github/workflows/e2e.project-access.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: e2e:project-access -# https://docs.github.com/en/actions/reference/events-that-trigger-workflows -on: [ deployment_status ] -jobs: - e2e: - # only runs this job on successful deploy - if: github.event_name == 'deployment_status' && github.event.deployment_status.state == 'success' && contains(github.event.deployment_status.target_url, 'unleash-monorepo-frontend') - runs-on: ubuntu-latest - steps: - - name: Dump GitHub context - env: - GITHUB_CONTEXT: ${{ toJson(github) }} - run: | - echo "$GITHUB_CONTEXT" - - name: Checkout - uses: actions/checkout@v3 - - name: Run Cypress - uses: cypress-io/github-action@v2 - with: - working-directory: frontend - env: AUTH_USER=admin,AUTH_PASSWORD=unleash4all - config: baseUrl=${{ github.event.deployment_status.target_url }} - spec: cypress/integration/projects/access/project-access.spec.ts diff --git a/.github/workflows/e2e.segments.yml b/.github/workflows/e2e.segments.yml deleted file mode 100644 index 14b6665206..0000000000 --- a/.github/workflows/e2e.segments.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: e2e:segments -# https://docs.github.com/en/actions/reference/events-that-trigger-workflows -on: [ deployment_status ] -jobs: - e2e: - # only runs this job on successful deploy - if: github.event_name == 'deployment_status' && github.event.deployment_status.state == 'success' && contains(github.event.deployment_status.target_url, 'unleash-monorepo-frontend') - runs-on: ubuntu-latest - steps: - - name: Dump GitHub context - env: - GITHUB_CONTEXT: ${{ toJson(github) }} - run: | - echo "$GITHUB_CONTEXT" - - name: Checkout - uses: actions/checkout@v3 - - name: Run Cypress - uses: cypress-io/github-action@v2 - with: - working-directory: frontend - env: AUTH_USER=admin,AUTH_PASSWORD=unleash4all - config: baseUrl=${{ github.event.deployment_status.target_url }} - spec: cypress/integration/segments/segments.spec.ts diff --git a/frontend/cypress/integration/projects/access/project-access.spec.ts b/frontend/cypress/integration/projects/access.spec.ts similarity index 99% rename from frontend/cypress/integration/projects/access/project-access.spec.ts rename to frontend/cypress/integration/projects/access.spec.ts index cd9039449e..ec16c6f334 100644 --- a/frontend/cypress/integration/projects/access/project-access.spec.ts +++ b/frontend/cypress/integration/projects/access.spec.ts @@ -8,7 +8,7 @@ import { PA_ROLE_ID, PA_USERS_GROUPS_ID, PA_USERS_GROUPS_TITLE_ID, -} from '../../../../src/utils/testIds'; +} from '../../../src/utils/testIds'; export {}; const baseUrl = Cypress.config().baseUrl;