From 7a24bccfb642b17ba2dd81ece1cc27e3126f2d4c Mon Sep 17 00:00:00 2001 From: Popov Aleksey Date: Tue, 8 Aug 2023 12:36:42 +0300 Subject: [PATCH] github-actions: added saving debug logs by default for all functional tests (#7931) [closes DevExpress/testcafe-private#232] ## Purpose _Describe the problem you want to address or the feature you want to implement._ ## Approach _Describe how your changes address the issue or implement the desired functionality in as much detail as possible._ ## References _Provide a link to the existing issue(s), if any._ ## Pre-Merge TODO - [ ] Write tests for your proposed changes - [ ] Make sure that existing tests do not fail --- .github/workflows/deploy-to-artifacts.yml | 7 +------ .github/workflows/test-functional-docker.yml | 4 ---- .github/workflows/test-functional-local-chrome.yml | 4 ---- .github/workflows/test-functional-local-edge.yml | 4 ---- .github/workflows/test-functional-local-esm.yml | 4 ---- .github/workflows/test-functional-local-firefox.yml | 4 ---- .../workflows/test-functional-local-headed-browsers.yml | 4 ---- .github/workflows/test-functional-local-legacy.yml | 4 ---- .../workflows/test-functional-local-multiple-windows.yml | 4 ---- .../workflows/test-functional-local-native-automation.yml | 4 ---- .github/workflows/test-functional-local-safari.yml | 4 ---- .github/workflows/test-functional-remote-mobile.yml | 4 ---- .github/workflows/test-functional.yml | 6 +++--- 13 files changed, 4 insertions(+), 53 deletions(-) diff --git a/.github/workflows/deploy-to-artifacts.yml b/.github/workflows/deploy-to-artifacts.yml index 1cde84431ea..ec6625aa220 100644 --- a/.github/workflows/deploy-to-artifacts.yml +++ b/.github/workflows/deploy-to-artifacts.yml @@ -11,10 +11,6 @@ on: description: 'The merge commit SHA' base_sha: description: 'The base commit SHA' - debug: - required: false - type: string - default: '' jobs: build: @@ -109,12 +105,11 @@ jobs: github-token: ${{secrets.ACTIVE_TOKEN}} script: | function getInputs () { - const { sha, merged_sha, debug } = context.payload.inputs; + const { sha, merged_sha } = context.payload.inputs; return { ...merged_sha ? { merged_sha } : {}, sha, - debug, deploy_run_id: '${{github.run_id}}' } } diff --git a/.github/workflows/test-functional-docker.yml b/.github/workflows/test-functional-docker.yml index b96177380d3..d8abac943d8 100644 --- a/.github/workflows/test-functional-docker.yml +++ b/.github/workflows/test-functional-docker.yml @@ -11,10 +11,6 @@ on: description: 'The merge commit SHA' deploy_run_id: description: 'The ID of a deployment workspace run with artifacts' - debug: - required: false - type: string - default: '' jobs: test: uses: ./.github/workflows/test-functional.yml diff --git a/.github/workflows/test-functional-local-chrome.yml b/.github/workflows/test-functional-local-chrome.yml index 24b9cc703b4..4de9ed11936 100644 --- a/.github/workflows/test-functional-local-chrome.yml +++ b/.github/workflows/test-functional-local-chrome.yml @@ -11,10 +11,6 @@ on: description: 'The merge commit SHA' deploy_run_id: description: 'The ID of a deployment workspace run with artifacts' - debug: - required: false - type: string - default: '' jobs: test: uses: ./.github/workflows/test-functional.yml diff --git a/.github/workflows/test-functional-local-edge.yml b/.github/workflows/test-functional-local-edge.yml index 840df4972f5..48f4eb41de2 100644 --- a/.github/workflows/test-functional-local-edge.yml +++ b/.github/workflows/test-functional-local-edge.yml @@ -11,10 +11,6 @@ on: description: 'The merge commit SHA' deploy_run_id: description: 'The ID of a deployment workspace run with artifacts' - debug: - required: false - type: string - default: '' jobs: test: uses: ./.github/workflows/test-functional.yml diff --git a/.github/workflows/test-functional-local-esm.yml b/.github/workflows/test-functional-local-esm.yml index 86a3b7bdb5f..109a338c5fa 100644 --- a/.github/workflows/test-functional-local-esm.yml +++ b/.github/workflows/test-functional-local-esm.yml @@ -11,10 +11,6 @@ on: description: 'The merge commit SHA' deploy_run_id: description: 'The ID of a deployment workspace run with artifacts' - debug: - required: false - type: string - default: '' jobs: test: uses: ./.github/workflows/test-functional.yml diff --git a/.github/workflows/test-functional-local-firefox.yml b/.github/workflows/test-functional-local-firefox.yml index b6b8a8941ac..ec263b887ab 100644 --- a/.github/workflows/test-functional-local-firefox.yml +++ b/.github/workflows/test-functional-local-firefox.yml @@ -11,10 +11,6 @@ on: description: 'The merge commit SHA' deploy_run_id: description: 'The ID of a deployment workspace run with artifacts' - debug: - required: false - type: string - default: '' jobs: test: uses: ./.github/workflows/test-functional.yml diff --git a/.github/workflows/test-functional-local-headed-browsers.yml b/.github/workflows/test-functional-local-headed-browsers.yml index 00e8f7884d9..f420b57e52f 100644 --- a/.github/workflows/test-functional-local-headed-browsers.yml +++ b/.github/workflows/test-functional-local-headed-browsers.yml @@ -11,10 +11,6 @@ on: description: 'The merge commit SHA' deploy_run_id: description: 'The ID of a deployment workspace run with artifacts' - debug: - required: false - type: string - default: '' jobs: test: uses: ./.github/workflows/test-functional.yml diff --git a/.github/workflows/test-functional-local-legacy.yml b/.github/workflows/test-functional-local-legacy.yml index 07d49987965..6b2f09845d0 100644 --- a/.github/workflows/test-functional-local-legacy.yml +++ b/.github/workflows/test-functional-local-legacy.yml @@ -11,10 +11,6 @@ on: description: 'The merge commit SHA' deploy_run_id: description: 'The ID of a deployment workspace run with artifacts' - debug: - required: false - type: string - default: '' jobs: test: uses: ./.github/workflows/test-functional.yml diff --git a/.github/workflows/test-functional-local-multiple-windows.yml b/.github/workflows/test-functional-local-multiple-windows.yml index 22510b388bc..34eea353fc7 100644 --- a/.github/workflows/test-functional-local-multiple-windows.yml +++ b/.github/workflows/test-functional-local-multiple-windows.yml @@ -11,10 +11,6 @@ on: description: 'The merge commit SHA' deploy_run_id: description: 'The ID of a deployment workspace run with artifacts' - debug: - required: false - type: string - default: '' jobs: test: uses: ./.github/workflows/test-functional.yml diff --git a/.github/workflows/test-functional-local-native-automation.yml b/.github/workflows/test-functional-local-native-automation.yml index ec9bd111db9..3546f4f7a0d 100644 --- a/.github/workflows/test-functional-local-native-automation.yml +++ b/.github/workflows/test-functional-local-native-automation.yml @@ -11,10 +11,6 @@ on: description: 'The merge commit SHA' deploy_run_id: description: 'The ID of a deployment workspace run with artifacts' - debug: - required: false - type: string - default: '' jobs: test: uses: ./.github/workflows/test-functional.yml diff --git a/.github/workflows/test-functional-local-safari.yml b/.github/workflows/test-functional-local-safari.yml index 28df270a468..6e20bc00419 100644 --- a/.github/workflows/test-functional-local-safari.yml +++ b/.github/workflows/test-functional-local-safari.yml @@ -11,10 +11,6 @@ on: description: 'The merge commit SHA' deploy_run_id: description: 'The ID of a deployment workspace run with artifacts' - debug: - required: false - type: string - default: '' jobs: test: uses: ./.github/workflows/test-functional.yml diff --git a/.github/workflows/test-functional-remote-mobile.yml b/.github/workflows/test-functional-remote-mobile.yml index 67715f41546..b6d471d9edb 100644 --- a/.github/workflows/test-functional-remote-mobile.yml +++ b/.github/workflows/test-functional-remote-mobile.yml @@ -11,10 +11,6 @@ on: description: 'The merge commit SHA' deploy_run_id: description: 'The ID of a deployment workspace run with artifacts' - debug: - required: false - type: string - default: '' jobs: test: uses: ./.github/workflows/test-functional.yml diff --git a/.github/workflows/test-functional.yml b/.github/workflows/test-functional.yml index f6c97cbc81b..309f2a9383d 100644 --- a/.github/workflows/test-functional.yml +++ b/.github/workflows/test-functional.yml @@ -73,7 +73,7 @@ jobs: RETRY_FAILED_TESTS: ${{ inputs.retry_failed_tests }} TEST_GROUPS_COUNT: ${{ inputs.matrix-jobs-count }} TEST_GROUP_NUMBER: ${{ matrix.test-group }} - DEBUG: ${{ github.event.inputs.debug }} + DEBUG: 'testcafe*' DISPLAY: ${{ inputs.display }} outputs: # Matrix jobs cannot collect outputs about each of them automatically. It rewrites the same outputs. Improve it once it will be possible. @@ -142,7 +142,7 @@ jobs: local-logging-level: all-logs local-identifier: random - - run: ${{ inputs.test-script }} 2> testcafe-debug-log.log + - run: ${{ inputs.test-script }} 2> testcafe-debug-log-${{ matrix.test-group }}.log timeout-minutes: ${{ inputs.timeout }} - name: 'Stop BrowserStackLocal' @@ -152,11 +152,11 @@ jobs: local-testing: stop - name: Save debug log + if: always() uses: actions/upload-artifact@v3 with: name: testcafe-debug-log path: testcafe-debug-log-${{ matrix.test-group }}.log - if: ${{ always() && github.event.inputs.debug != '' }} - name: Save result id: save-result