Skip to content

Commit

Permalink
chore: remove reportportal integration (#618)
Browse files Browse the repository at this point in the history
The QA team has decided to remove Report Portal integration due to
minimal adoption and lack of tangible benefits. Developers rely on CI for test
failure analysis, and the Auto Triage feature was not utilized. Removing RP
will simplify CI pipelines and eliminate unnecessary maintenance.
  • Loading branch information
adeldhis2 authored Nov 27, 2024
1 parent 63e6adb commit ed97ea0
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 354 deletions.
10 changes: 0 additions & 10 deletions .github/workflows/verify-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,6 @@ jobs:

- name: Test
run: yarn d2-app-scripts test
env:
REPORTPORTAL_API_KEY: ${{ secrets.REPORTPORTAL_API_KEY }}
REPORTPORTAL_ENDPOINT: ${{ vars.REPORTPORTAL_ENDPOINT }}
REPORTPORTAL_PROJECT: ${{ vars.REPORTPORTAL_PROJECT }}
CI_BUILD_ID: ${{ github.sha }}-${{ github.workflow }}-${{ github.event_name }}
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
PR_TITLE: ${{ github.event_name == 'pull_request' && github.event.pull_request.title || format('Direct push to {0}', github.ref_name) }}

call-workflow-e2e-prod:
if: "!contains(github.event.head_commit.message, '[skip ci]')"
Expand All @@ -98,6 +91,3 @@ jobs:
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 }}
28 changes: 0 additions & 28 deletions cypress.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,34 +42,6 @@ async function setupNodeEvents(on, config) {

module.exports = defineConfig({
projectId: 'm5qvjx',
reporter: '@reportportal/agent-js-cypress',
reporterOptions: {
endpoint: process.env.REPORTPORTAL_ENDPOINT,
apiKey: process.env.REPORTPORTAL_API_KEY,
launch: 'line_listing_app',
project: process.env.REPORTPORTAL_PROJECT,
description: '',
autoMerge: true,
parallel: true,
debug: false,
restClientConfig: {
timeout: 660000,
},
attributes: [
{
key: 'dhis2_version',
value: process.env.DHIS2_VERSION,
},
{
key: 'app_name',
value: 'line-listing-app',
},
{
key: 'test_level',
value: 'e2e',
},
],
},
e2e: {
setupNodeEvents,
baseUrl: 'http://localhost:3000',
Expand Down
51 changes: 1 addition & 50 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,49 +1,3 @@
const reportPortalConfig = [
'@reportportal/agent-js-jest',
{
apiKey: process.env.REPORTPORTAL_API_KEY,
endpoint: process.env.REPORTPORTAL_ENDPOINT,
project: process.env.REPORTPORTAL_PROJECT,
launch: 'line_listing_app',
attributes: [
{
key: 'dhis2_version',
value: 'master',
},
{
key: 'app_name',
value: 'line-listing-app',
},
{
key: 'test_level',
value: 'unit/integration',
},
{
key: 'BRANCH_NAME',
value: process.env.BRANCH_NAME,
},
{
key: 'CI_BUILD_ID',
value: process.env.CI_BUILD_ID,
},
{
key: 'PR_TITLE',
value: process.env.PR_TITLE,
},
],
description: '',
debug: true,
},
]

const isDependabotPR = process.env.GITHUB_ACTOR === 'dependabot[bot]'

const isReportPortalSetup =
process.env.REPORTPORTAL_API_KEY !== undefined &&
process.env.REPORTPORTAL_ENDPOINT !== undefined &&
process.env.REPORTPORTAL_PROJECT !== undefined &&
!isDependabotPR

module.exports = {
transformIgnorePatterns: [
'node_modules/(?!(lodash-es|@dhis2/d2-ui-[a-z-]+)/)',
Expand All @@ -57,8 +11,5 @@ module.exports = {
'**/src/**/__tests__/**/*.spec.[jt]s?(x)',
'**/cypress/support/__tests__/**/*.test.[jt]s?(x)',
],
reporters: [
'default',
...(isReportPortalSetup ? [reportPortalConfig] : []),
],
reporters: ['default'],
}
2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
"@dhis2/cli-style": "^10.4.3",
"@dhis2/cypress-commands": "^10.0.3",
"@dhis2/cypress-plugins": "^10.0.2",
"@reportportal/agent-js-cypress": "git+https://github.com/dhis2/agent-js-cypress.git#develop",
"@reportportal/agent-js-jest": "^5.0.8",
"@semantic-release/changelog": "^6",
"@semantic-release/exec": "^6",
"@semantic-release/git": "^10",
Expand Down
Loading

0 comments on commit ed97ea0

Please sign in to comment.