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()'
|
||||
uses: trunk-io/analytics-uploader@main
|
||||
with:
|
||||
junit-paths: test-apps/e2e/test-results/**/junit.xml
|
||||
junit-paths: test-apps/junit-reports/*.xml
|
||||
org-slug: strapi
|
||||
token: ${{ secrets.TRUNK_API_TOKEN }}
|
||||
continue-on-error: true
|
||||
@ -296,7 +296,7 @@ jobs:
|
||||
if: '!cancelled()'
|
||||
uses: trunk-io/analytics-uploader@main
|
||||
with:
|
||||
junit-paths: test-apps/e2e/test-results/**/junit.xml
|
||||
junit-paths: test-apps/junit-reports/*.xml
|
||||
org-slug: strapi
|
||||
token: ${{ secrets.TRUNK_API_TOKEN }}
|
||||
continue-on-error: true
|
||||
|
@ -28,14 +28,14 @@ const getEnvBool = (envVar, defaultValue) => {
|
||||
|
||||
/**
|
||||
* @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
|
||||
* @type {(options: ConfigOptions) => import('@playwright/test').PlaywrightTestConfig}
|
||||
*/
|
||||
const createConfig = ({ port, testDir, appDir }) => ({
|
||||
const createConfig = ({ port, testDir, appDir, reportFileName }) => ({
|
||||
testDir,
|
||||
|
||||
/* default timeout for a jest test */
|
||||
@ -64,8 +64,8 @@ const createConfig = ({ port, testDir, appDir }) => ({
|
||||
'junit',
|
||||
{
|
||||
outputFile: path.join(
|
||||
getEnvString(process.env.PLAYWRIGHT_OUTPUT_DIR, '../test-results/'),
|
||||
'junit.xml'
|
||||
getEnvString(process.env.PLAYWRIGHT_OUTPUT_DIR, '../../junit-reports/'),
|
||||
reportFileName
|
||||
),
|
||||
},
|
||||
],
|
||||
|
@ -212,6 +212,7 @@ yargs
|
||||
testDir: path.join(testDomainRoot, domain),
|
||||
port,
|
||||
appDir: testAppPath,
|
||||
reportFileName: `playwright-${domain}-${port}.xml`,
|
||||
});
|
||||
|
||||
const configFileTemplate = `
|
||||
|
Loading…
x
Reference in New Issue
Block a user