Skip to content

Commit

Permalink
test: publish cypress test results to reportportal
Browse files Browse the repository at this point in the history
  • Loading branch information
adeldhis2 committed Jul 19, 2023
1 parent 7bd4836 commit e993316
Show file tree
Hide file tree
Showing 5 changed files with 329 additions and 84 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/dhis2-verify-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ jobs:
cache-key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
group: 'e2e'
tag: ${{ github.event_name }}
reporter-options:
- apiKey: ${{ secrets.CYPRESS_RP_API_KEY }}
env:
CI: true
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
Expand All @@ -119,7 +121,6 @@ jobs:
cypress_dhis2_username: ${{ secrets.CYPRESS_DHIS2_USERNAME }}
cypress_dhis2_password: ${{ secrets.CYPRESS_DHIS2_PASSWORD }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

release:
runs-on: ubuntu-latest
needs: e2e-prod
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ jobs:
wait-on-timeout: 300
group: 'e2e'
tag: ${{ github.event_name }}
env:
reporter-options:
- apiKey: ${{ secrets.CYPRESS_RP_API_KEY }}
env:
CI: true
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
SERVER_START_CMD: 'yarn cypress:start'
Expand All @@ -53,7 +55,6 @@ jobs:
cypress_dhis2_username: ${{ secrets.CYPRESS_DHIS2_USERNAME }}
cypress_dhis2_password: ${{ secrets.CYPRESS_DHIS2_PASSWORD }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

send-slack-message:
runs-on: ubuntu-latest
needs: e2e-dev
Expand Down
25 changes: 24 additions & 1 deletion cypress.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,28 @@
"projectId": "5fk191",
"testFiles": "**/*.feature",
"viewportWidth": 1280,
"viewportHeight": 800
"viewportHeight": 800,
"reporter": "@reportportal/agent-js-cypress",
"reporterOptions": {
"endpoint": "https://test.tools.dhis2.org/reportportal/api/v1",
"apiKey": "",
"launch": "dashboard_app_master",
"project": "dhis2_auto",
"description": "",
"attributes": [
{
"key": "version",
"value": "master"
},
{
"value": "dashboard_app"
}
],
"debug": false,
"parallel": true,
"autoMerge": true,
"restClientConfig": {
"timeout": 90000
}
}
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
"@dhis2/cli-style": "^10.5.1",
"@dhis2/cli-utils-cypress": "^7.0.1",
"@dhis2/cypress-commands": "^7.0.1",
"@reportportal/agent-js-cypress": "^5.1.2",
"@testing-library/jest-dom": "^5.14.1",
"@testing-library/react": "^12.0.0",
"d2-manifest": "^1.0.0",
Expand Down
Loading

0 comments on commit e993316

Please sign in to comment.