mirror of
https://github.com/strapi/strapi.git
synced 2025-06-27 00:41:25 +00:00
Fix report generation and upload (#23231)
* Fix report generation and upload * revert pointless empty line change
This commit is contained in:
parent
5cb623f32d
commit
0791cd2736
4
.github/workflows/tests.yml
vendored
4
.github/workflows/tests.yml
vendored
@ -244,7 +244,7 @@ jobs:
|
|||||||
if: '!cancelled()'
|
if: '!cancelled()'
|
||||||
uses: trunk-io/analytics-uploader@main
|
uses: trunk-io/analytics-uploader@main
|
||||||
with:
|
with:
|
||||||
junit-paths: test-apps/e2e/test-results/**/junit.xml
|
junit-paths: test-apps/junit-reports/*.xml
|
||||||
org-slug: strapi
|
org-slug: strapi
|
||||||
token: ${{ secrets.TRUNK_API_TOKEN }}
|
token: ${{ secrets.TRUNK_API_TOKEN }}
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
@ -296,7 +296,7 @@ jobs:
|
|||||||
if: '!cancelled()'
|
if: '!cancelled()'
|
||||||
uses: trunk-io/analytics-uploader@main
|
uses: trunk-io/analytics-uploader@main
|
||||||
with:
|
with:
|
||||||
junit-paths: test-apps/e2e/test-results/**/junit.xml
|
junit-paths: test-apps/junit-reports/*.xml
|
||||||
org-slug: strapi
|
org-slug: strapi
|
||||||
token: ${{ secrets.TRUNK_API_TOKEN }}
|
token: ${{ secrets.TRUNK_API_TOKEN }}
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
@ -28,14 +28,14 @@ const getEnvBool = (envVar, defaultValue) => {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef ConfigOptions
|
* @typedef ConfigOptions
|
||||||
* @type {{ port: number; testDir: string; appDir: string }}
|
* @type {{ port: number; testDir: string; appDir: string; reportFileName: string }}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see https://playwright.dev/docs/test-configuration
|
* @see https://playwright.dev/docs/test-configuration
|
||||||
* @type {(options: ConfigOptions) => import('@playwright/test').PlaywrightTestConfig}
|
* @type {(options: ConfigOptions) => import('@playwright/test').PlaywrightTestConfig}
|
||||||
*/
|
*/
|
||||||
const createConfig = ({ port, testDir, appDir }) => ({
|
const createConfig = ({ port, testDir, appDir, reportFileName }) => ({
|
||||||
testDir,
|
testDir,
|
||||||
|
|
||||||
/* default timeout for a jest test */
|
/* default timeout for a jest test */
|
||||||
@ -64,8 +64,8 @@ const createConfig = ({ port, testDir, appDir }) => ({
|
|||||||
'junit',
|
'junit',
|
||||||
{
|
{
|
||||||
outputFile: path.join(
|
outputFile: path.join(
|
||||||
getEnvString(process.env.PLAYWRIGHT_OUTPUT_DIR, '../test-results/'),
|
getEnvString(process.env.PLAYWRIGHT_OUTPUT_DIR, '../../junit-reports/'),
|
||||||
'junit.xml'
|
reportFileName
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
@ -212,6 +212,7 @@ yargs
|
|||||||
testDir: path.join(testDomainRoot, domain),
|
testDir: path.join(testDomainRoot, domain),
|
||||||
port,
|
port,
|
||||||
appDir: testAppPath,
|
appDir: testAppPath,
|
||||||
|
reportFileName: `playwright-${domain}-${port}.xml`,
|
||||||
});
|
});
|
||||||
|
|
||||||
const configFileTemplate = `
|
const configFileTemplate = `
|
||||||
|
Loading…
x
Reference in New Issue
Block a user