1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-25 00:07:47 +01:00

Merge e2e tests into matrix (#2007)

This commit is contained in:
sjaanus 2022-08-30 13:23:09 +00:00 committed by GitHub
parent 5d8c81d659
commit e21cf00ca7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 11 additions and 75 deletions

View File

@ -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 }}

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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;