From f6521829cc469a85de908cc6c59ec796f760538e Mon Sep 17 00:00:00 2001 From: akash-codemonk <67054171+akash-codemonk@users.noreply.github.com> Date: Wed, 4 Oct 2023 10:45:47 +0530 Subject: [PATCH] chore: test --- .github/workflows/ci-test-limited.yml | 12 +++++++++++- app/client/.gitignore | 1 + app/client/cypress/plugins/index.js | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-test-limited.yml b/.github/workflows/ci-test-limited.yml index 870b88b4cc3..75db761ee3f 100644 --- a/.github/workflows/ci-test-limited.yml +++ b/.github/workflows/ci-test-limited.yml @@ -521,8 +521,18 @@ jobs: config-file: cypress_ci_custom.config.ts working-directory: app/client env: "NODE_ENV=development" + + - name: Trim number of cypress log files + run: | + find ${{ github.workspace }}/app/client/cypress/cypress-logs -name '*.json' -type f | tail -n +11 | xargs -I {} rm -- {} + + - name: Upload failed test cypress logs artifact + uses: actions/upload-artifact@v3 + with: + name: cypress-console-logs + path: ${{ github.workspace }}/app/client/cypress/cypress-logs - - name: Collect CI container logs + - name: Test if: failure() working-directory: "." run: | diff --git a/app/client/.gitignore b/app/client/.gitignore index b32680884fd..1082b216bf8 100755 --- a/app/client/.gitignore +++ b/app/client/.gitignore @@ -38,6 +38,7 @@ cypress/videos cypress/screenshots cypress/limited-tests.txt cypress.env.json +cypress/cypress-logs results/ diff --git a/app/client/cypress/plugins/index.js b/app/client/cypress/plugins/index.js index 5b6bb3eeeb3..08c83666dbf 100644 --- a/app/client/cypress/plugins/index.js +++ b/app/client/cypress/plugins/index.js @@ -51,7 +51,7 @@ module.exports = async (on, config) => { "cypress-logs|json": "json", }, specRoot: "cypress/e2e", - printLogsToFile: "onFail", + printLogsToFile: "always", }; installLogsPrinter(on, logsPrinterOptions);