Skip to content

Commit

Permalink
chore: split e2e testing into separate workflows for GitHub Actions a…
Browse files Browse the repository at this point in the history
…nd Cypress Cloud
  • Loading branch information
adeldhis2 committed May 22, 2024
1 parent 5143207 commit 27e059c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
17 changes: 14 additions & 3 deletions .github/workflows/dhis2-verify-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,11 @@ jobs:
REPORTPORTAL_ENDPOINT: ${{ vars.REPORTPORTAL_ENDPOINT }}
REPORTPORTAL_PROJECT: ${{ vars.REPORTPORTAL_PROJECT }}

call-workflow-e2e-prod:
call-workflow-e2e-github-actions:
if: "!contains(github.event.head_commit.message, '[skip ci]')"
needs: [build, lint, test, setup-matrix]
uses: dhis2/workflows/.github/workflows/analytics-e2e-tests-prod.yml@update-cypress-setup
uses: dhis2/workflows/.github/workflows/analytics-e2e-tests-github-actions.yml@update-cypress-setup
with:
should_record: ${{ contains(github.event.head_commit.message, '[e2e record]') || contains(join(github.event.pull_request.labels.*.name), 'e2e record')}}
spec-group: ${{ needs.setup-matrix.outputs.matrix }}
secrets:
username: ${{ secrets.CYPRESS_DHIS2_USERNAME }}
Expand All @@ -106,6 +105,18 @@ jobs:
reportportal_endpoint: ${{ vars.REPORTPORTAL_ENDPOINT }}
reportportal_project: ${{ vars.REPORTPORTAL_PROJECT }}

call-workflow-e2e-cypress-cloud:
if: "!contains(github.event.head_commit.message, '[skip ci]') && (contains(github.event.head_commit.message, '[e2e record]') || contains(join(github.event.pull_request.labels.*.name), 'e2e record'))"
needs: [build, lint, test, setup-matrix]
uses: dhis2/workflows/.github/workflows/analytics-e2e-tests-cypress-cloud.yml@update-cypress-setup
secrets:
username: ${{ secrets.CYPRESS_DHIS2_USERNAME }}
password: ${{ secrets.CYPRESS_DHIS2_PASSWORD }}
recordkey: ${{ secrets.CYPRESS_RECORD_KEY }}
reportportal_api_key: ${{ secrets.REPORTPORTAL_API_KEY }}
reportportal_endpoint: ${{ vars.REPORTPORTAL_ENDPOINT }}
reportportal_project: ${{ vars.REPORTPORTAL_PROJECT }}

release:
runs-on: ubuntu-latest
needs: call-workflow-e2e-prod
Expand Down
2 changes: 1 addition & 1 deletion cypress/support/generateTestMatrix.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const getAllFiles = (dirPath, arrayOfFiles = []) => {
return arrayOfFiles
}

const createGroups = (files, numberOfGroups = 5) => {
const createGroups = (files, numberOfGroups = 7) => {
const groups = []
for (let i = 0; i < numberOfGroups; i++) {
groups.push([])
Expand Down

0 comments on commit 27e059c

Please sign in to comment.