mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
[ACS-7494] add report portal for ACA (#3794)
* [ACS-7494] dev-reportportal-aca * [ACS-7494] add reportportal-aca * [ACS-7494] add reportportal variable * [ACS-7494] change year * [ACS-7494] review changes * [ACS-7494] review changes * [ACS-7494] review changes
This commit is contained in:
@@ -22,14 +22,13 @@
|
||||
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { PlaywrightTestConfig, ReporterDescription, devices } from '@playwright/test';
|
||||
import { PlaywrightTestConfig, devices } from '@playwright/test';
|
||||
import { timeouts } from '../utils';
|
||||
import { getReporter } from './report-portal.config';
|
||||
|
||||
require('@alfresco/adf-cli/tooling').dotenvConfig();
|
||||
const { env } = process;
|
||||
|
||||
const report: ReporterDescription[] = (env.CI) ? [['github']] : [['html']];
|
||||
|
||||
export const getGlobalConfig: PlaywrightTestConfig = {
|
||||
timeout: timeouts.globalTest,
|
||||
globalTimeout: timeouts.globalSpec,
|
||||
@@ -48,7 +47,8 @@ export const getGlobalConfig: PlaywrightTestConfig = {
|
||||
retries: env.CI ? 2 : 0,
|
||||
/* Opt out of parallel tests on CI. */
|
||||
workers: 3,
|
||||
reporter: [['list'], ...report],
|
||||
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
|
||||
reporter: [['list'], ...getReporter()],
|
||||
globalSetup: require.resolve('./global.setup'),
|
||||
testMatch: ['**/*.e2e.ts'],
|
||||
use: {
|
||||
|
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* License rights for this program may be obtained from Hyland Software, Inc.
|
||||
* pursuant to a written agreement and any use of this program without such an
|
||||
* agreement is prohibited.
|
||||
*/
|
||||
|
||||
import { ReporterDescription } from '@playwright/test';
|
||||
import { timeouts } from '../utils';
|
||||
|
||||
const { env } = process;
|
||||
|
||||
export const getReportPortalConfig = () => {
|
||||
const attributes = [
|
||||
{ key: 'Job', value: `${env.GITHUB_JOB}` },
|
||||
{ key: 'Build_type', value: `${env.GITHUB_EVENT_NAME}` },
|
||||
{ key: 'Repository', value: `${env.GITHUB_REPOSITORY}` },
|
||||
{ key: 'Branch', value: `${env.GITHUB_HEAD_REF || env.GITHUB_REF}` }
|
||||
];
|
||||
|
||||
const launch = `GitHub Actions - ACA`;
|
||||
|
||||
return {
|
||||
endpoint: env.REPORT_PORTAL_URL,
|
||||
apiKey: env.REPORT_PORTAL_TOKEN,
|
||||
project: 'alfresco-content-app',
|
||||
launch,
|
||||
includeTestSteps: true,
|
||||
restClientConfig: {
|
||||
timeout: timeouts.extendedTest
|
||||
},
|
||||
attributes,
|
||||
description: `[Run on GitHub Actions ${env.GITHUB_RUN_ID}](${env.GITHUB_SERVER_URL}/${env.GITHUB_REPOSITORY}/actions/runs/${env.GITHUB_RUN_ID})`
|
||||
};
|
||||
};
|
||||
|
||||
export const getReporter = (): ReporterDescription[] =>
|
||||
env.CI
|
||||
? [['@reportportal/agent-js-playwright', getReportPortalConfig()], ['github']]
|
||||
: [['html']];
|
Reference in New Issue
Block a user