Skip to content

Commit

Permalink
ci: fix UI tests result reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
yusufkandemir committed Mar 8, 2024
1 parent a65459e commit ce9f638
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 60 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests-on-pr-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,5 @@ jobs:
commit: ${{ github.event.workflow_run.head_sha }}
event_file: event-data/event.json
event_name: ${{ github.event.workflow_run.event }}
files: 'test-results/*.json'
files: 'test-results/*/*.xml'
check_name: 'UI Tests Results'
4 changes: 2 additions & 2 deletions .github/workflows/tests-on-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ jobs:
- name: Run tests in ${{ matrix.browser }} browser
uses: cypress-io/github-action@v6
env:
CYPRESS_JSON_RESULTS_FILENAME: test-results-${{ matrix.browser }}.json
CYPRESS_JUNIT_RESULTS_FILENAME: test-results/${{ matrix.browser }}/[hash].xml
with:
install: false
command: yarn test:component:run --browser ${{ matrix.browser }}
Expand All @@ -115,7 +115,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: test-results-${{ matrix.browser }}
path: ui/dev/test-results-${{ matrix.browser }}.json
path: ui/dev/test-results

- name: Upload GitHub Actions event data
if: ${{ always() }}
Expand Down
20 changes: 6 additions & 14 deletions ui/dev/cypress.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,15 @@ module.exports = defineConfig({
videosFolder: '../test/cypress/videos',
videoCompression: false,
video: false,
...(process.env.CYPRESS_JUNIT_RESULTS_FILENAME !== undefined ? {
reporter: 'junit',
reporterOptions: {
mochaFile: process.env.CYPRESS_JUNIT_RESULTS_FILENAME
}
} : {}),
e2e: {
setupNodeEvents (on, config) {
registerCodeCoverageTasks(on, config)

if (process.env.CYPRESS_JSON_RESULTS_FILENAME !== undefined) {
require('cypress-json-results')({
on,
filename: process.env.CYPRESS_JSON_RESULTS_FILENAME
})
}
},
baseUrl: 'http://localhost:9000/',
supportFile: '../test/cypress/support/e2e.js',
Expand All @@ -37,13 +36,6 @@ module.exports = defineConfig({
component: {
setupNodeEvents (on, config) {
registerCodeCoverageTasks(on, config)

if (process.env.CYPRESS_JSON_RESULTS_FILENAME !== undefined) {
require('cypress-json-results')({
on,
filename: process.env.CYPRESS_JSON_RESULTS_FILENAME
})
}
},
supportFile: '../test/cypress/support/component.js',
specPattern: [ '../src/components/**/*.cy.{js,jsx,ts,tsx}', '../src/composables/**/*.cy.{js,jsx,ts,tsx}' ],
Expand Down
1 change: 0 additions & 1 deletion ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@
"cross-env": "^7.0.3",
"cssnano": "^6.0.5",
"cypress": "^13.6.6",
"cypress-json-results": "^1.2.1",
"diff": "^5.2.0",
"esbuild": "^0.20.1",
"eslint": "^8.57.0",
Expand Down
43 changes: 1 addition & 42 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,6 @@
resolved "https://registry.yarnpkg.com/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz#bd9154aec9983f77b3a034ecaa015c2e4201f6cf"
integrity sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==

"@actions/core@^1.10.0":
version "1.10.1"
resolved "https://registry.yarnpkg.com/@actions/core/-/core-1.10.1.tgz#61108e7ac40acae95ee36da074fa5850ca4ced8a"
integrity sha512-3lBR9EDAY+iYIpTnTIXmWcNbX3T2kCkAEQGIQx4NVQ0575nk2k3GRZDTPQG+vVtS2izSLmINlxXf0uLtnrTP+g==
dependencies:
"@actions/http-client" "^2.0.1"
uuid "^8.3.2"

"@actions/http-client@^2.0.1":
version "2.2.1"
resolved "https://registry.yarnpkg.com/@actions/http-client/-/http-client-2.2.1.tgz#ed3fe7a5a6d317ac1d39886b0bb999ded229bb38"
integrity sha512-KhC/cZsq7f8I4LfZSJKgCvEwfkE8o1538VoBeoGzokVLLnbFDEAdFD3UhoMklxo2un9NJVBdANOresx7vTHlHw==
dependencies:
tunnel "^0.0.6"
undici "^5.25.4"

"@ampproject/remapping@^2.2.0":
version "2.3.0"
resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.3.0.tgz#ed441b6fa600072520ce18b43d2c8cc8caecc7f4"
Expand Down Expand Up @@ -1374,11 +1358,6 @@
resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.57.0.tgz#a5417ae8427873f1dd08b70b3574b453e67b5f7f"
integrity sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==

"@fastify/busboy@^2.0.0":
version "2.1.1"
resolved "https://registry.yarnpkg.com/@fastify/busboy/-/busboy-2.1.1.tgz#b9da6a878a371829a0502c9b6c1c143ef6663f4d"
integrity sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==

"@hapi/hoek@^9.0.0", "@hapi/hoek@^9.3.0":
version "9.3.0"
resolved "https://registry.yarnpkg.com/@hapi/hoek/-/hoek-9.3.0.tgz#8368869dcb735be2e7f5cb7647de78e167a251fb"
Expand Down Expand Up @@ -3092,7 +3071,7 @@ commander@^8.0.0:
resolved "https://registry.yarnpkg.com/commander/-/commander-8.3.0.tgz#4837ea1b2da67b9c616a67afbb0fafee567bca66"
integrity sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==

common-tags@^1.8.0, common-tags@^1.8.2:
common-tags@^1.8.0:
version "1.8.2"
resolved "https://registry.yarnpkg.com/common-tags/-/common-tags-1.8.2.tgz#94ebb3c076d26032745fd54face7f688ef5ac9c6"
integrity sha512-gk/Z852D2Wtb//0I+kRFNKKE9dIIVirjoqPoA1wJU+XePVXZfGeBpk45+A1rKO4Q43prqWBNY/MiIeRLbPWUaA==
Expand Down Expand Up @@ -3352,14 +3331,6 @@ csstype@^3.1.3:
resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.1.3.tgz#d80ff294d114fb0e6ac500fbf85b60137d7eff81"
integrity sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==

cypress-json-results@^1.2.1:
version "1.5.0"
resolved "https://registry.yarnpkg.com/cypress-json-results/-/cypress-json-results-1.5.0.tgz#fb93bd630e03725d2ff7e9ac8ed63d2ac42efa62"
integrity sha512-nkUXt2omWzRtoiY+gPuZcm9JwtY6DmEiee/fyehwBtTuxHgci+0h7jKNIu8PTHPaz/idnALrAZnaIYF76Z+JRA==
dependencies:
"@actions/core" "^1.10.0"
common-tags "^1.8.2"

cypress@^13.0.0, cypress@^13.6.6:
version "13.6.6"
resolved "https://registry.yarnpkg.com/cypress/-/cypress-13.6.6.tgz#5133f231ed1c6e57dc8dcbf60aade220bcd6884b"
Expand Down Expand Up @@ -8400,11 +8371,6 @@ tunnel-agent@^0.6.0:
dependencies:
safe-buffer "^5.0.1"

tunnel@^0.0.6:
version "0.0.6"
resolved "https://registry.yarnpkg.com/tunnel/-/tunnel-0.0.6.tgz#72f1314b34a5b192db012324df2cc587ca47f92c"
integrity sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==

tweetnacl@^0.14.3, tweetnacl@~0.14.0:
version "0.14.5"
resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64"
Expand Down Expand Up @@ -8546,13 +8512,6 @@ undici-types@~5.26.4:
resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617"
integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==

undici@^5.25.4:
version "5.28.3"
resolved "https://registry.yarnpkg.com/undici/-/undici-5.28.3.tgz#a731e0eff2c3fcfd41c1169a869062be222d1e5b"
integrity sha512-3ItfzbrhDlINjaP0duwnNsKpDQk3acHI3gVJ1z4fmwMK31k5G9OVIAMLSIaP6w4FaGkaAkN6zaQO9LUvZ1t7VA==
dependencies:
"@fastify/busboy" "^2.0.0"

unicode-canonical-property-names-ecmascript@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz#301acdc525631670d39f6146e0e77ff6bbdebddc"
Expand Down

0 comments on commit ce9f638

Please sign in to comment.