Skip to content

Commit

Permalink
chore: remove ReportPortal integration
Browse files Browse the repository at this point in the history
  • Loading branch information
adeldhis2 committed Nov 22, 2024
1 parent cf9cd47 commit 01a32e9
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 334 deletions.
10 changes: 0 additions & 10 deletions .github/workflows/verify-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,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 @@ -97,6 +90,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 @@ -23,34 +23,6 @@ async function setupNodeEvents(on, config) {

module.exports = defineConfig({
projectId: 'r5jduj',
reporter: '@reportportal/agent-js-cypress',
reporterOptions: {
endpoint: process.env.REPORTPORTAL_ENDPOINT,
apiKey: process.env.REPORTPORTAL_API_KEY,
launch: 'maps_app',
project: process.env.REPORTPORTAL_PROJECT,
description: '',
autoMerge: true,
parallel: true,
debug: false,
restClientConfig: {
timeout: 660000,
},
attributes: [
{
key: 'version',
value: 'master',
},
{
key: 'app_name',
value: 'maps-app',
},
{
key: 'test_level',
value: 'e2e',
},
],
},
e2e: {
setupNodeEvents,
baseUrl: 'http://localhost:3000',
Expand Down
52 changes: 1 addition & 51 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,48 +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: 'maps_app',
attributes: [
{
key: 'dhis2_version',
value: 'master',
},
{
key: 'app_name',
value: 'maps-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: false,
},
]

const isDependabotPR = process.env.GITHUB_ACTOR === 'dependabot[bot]'
const isGithubActionsRun = process.env.CI === 'true'
const isReportPortalSetup =
process.env.REPORTPORTAL_API_KEY !== undefined &&
process.env.REPORTPORTAL_ENDPOINT !== undefined &&
process.env.REPORTPORTAL_PROJECT !== undefined

module.exports = {
setupFilesAfterEnv: ['<rootDir>/config/testSetup.js'],
collectCoverageFrom: ['src/**/*.js'],
Expand All @@ -57,10 +12,5 @@ module.exports = {
snapshotSerializers: ['enzyme-to-json/serializer'],

testRunner: 'jest-circus/runner',
reporters: [
'default',
...(isGithubActionsRun && isReportPortalSetup && !isDependabotPR
? [reportPortalConfig]
: []),
],
reporters: ['default'],
}
2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@
"@dhis2/maps-gl": "^4.0.0",
"@dhis2/ui": "^9.13.0",
"@krakenjs/post-robot": "^11.0.0",
"@reportportal/agent-js-cypress": "git+https://github.com/dhis2/agent-js-cypress.git#develop",
"@reportportal/agent-js-jest": "^5.0.7",
"@testing-library/react-hooks": "^8.0.1",
"abortcontroller-polyfill": "^1.7.5",
"array-move": "^4.0.0",
Expand Down
Loading

0 comments on commit 01a32e9

Please sign in to comment.