diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1e06ec89..314cf4b2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -51,3 +51,8 @@ jobs: uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} + + - uses: codecov/test-results-action@v1 + with: + files: ./packages/elements-react/test-results/junit.xml + token: ${{ secrets.CODECOV_TOKEN }} diff --git a/package-lock.json b/package-lock.json index 557f005e..b6173571 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22639,6 +22639,7 @@ "resolved": "https://registry.npmjs.org/jest-junit/-/jest-junit-16.0.0.tgz", "integrity": "sha512-A94mmw6NfJab4Fg/BlvVOUXzXgF0XIH6EmTgJ5NDPp4xoKq0Kr7sErb+4Xs9nZvu58pJojz5RFGpqnZYJTrRfQ==", "dev": true, + "license": "Apache-2.0", "dependencies": { "mkdirp": "^1.0.4", "strip-ansi": "^6.0.1", @@ -33025,6 +33026,7 @@ "@types/lodash.merge": "4.6.9", "esbuild-plugin-svgr": "3.0.0", "eslint-plugin-react": "7.37.1", + "jest-junit": "16.0.0", "postcss": "8.4.47", "tsup": "8.3.0" }, diff --git a/packages/elements-react/.env.test b/packages/elements-react/.env.test new file mode 100644 index 00000000..61fc5997 --- /dev/null +++ b/packages/elements-react/.env.test @@ -0,0 +1,2 @@ +JEST_JUNIT_CLASSNAME="{filepath}" +JEST_JUNIT_OUTPUT_FILE="packages/elements-react/test-results/junit.xml" \ No newline at end of file diff --git a/packages/elements-react/.gitignore b/packages/elements-react/.gitignore index c07f2381..586ad83c 100644 --- a/packages/elements-react/.gitignore +++ b/packages/elements-react/.gitignore @@ -2,3 +2,4 @@ playwright/.cache/ playwright-report/* .last-run.json api-report/temp +test-results/ \ No newline at end of file diff --git a/packages/elements-react/jest.config.ts b/packages/elements-react/jest.config.ts index bb34ffb9..5c405b80 100644 --- a/packages/elements-react/jest.config.ts +++ b/packages/elements-react/jest.config.ts @@ -20,4 +20,5 @@ export default { moduleFileExtensions: ["ts", "tsx", "js", "jsx"], coverageDirectory: "../../coverage/packages/elements-react", coveragePathIgnorePatterns: ["/node_modules/", "/dist/", ".svg"], + reporters: ["default", "jest-junit"], } satisfies Config diff --git a/packages/elements-react/package.json b/packages/elements-react/package.json index 07f1de66..4ee7108f 100644 --- a/packages/elements-react/package.json +++ b/packages/elements-react/package.json @@ -56,6 +56,7 @@ "@types/lodash.merge": "4.6.9", "esbuild-plugin-svgr": "3.0.0", "eslint-plugin-react": "7.37.1", + "jest-junit": "16.0.0", "postcss": "8.4.47", "tsup": "8.3.0" },