Skip to content

Commit

Permalink
github-actions: added saving debug logs by default for all functional…
Browse files Browse the repository at this point in the history
… tests (#7931)

<!--
Thank you for your contribution.

Before making a PR, please read our contributing guidelines at

https://github.com/DevExpress/testcafe/blob/master/CONTRIBUTING.md#code-contribution

We recommend creating a *draft* PR, so that you can mark it as 'ready
for review' when you are done.
-->
[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
  • Loading branch information
Aleksey28 authored Aug 8, 2023
1 parent c7e99fc commit 7a24bcc
Show file tree
Hide file tree
Showing 13 changed files with 4 additions and 53 deletions.
7 changes: 1 addition & 6 deletions .github/workflows/deploy-to-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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}}'
}
}
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/test-functional-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/test-functional-local-chrome.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/test-functional-local-edge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/test-functional-local-esm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/test-functional-local-firefox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/test-functional-local-headed-browsers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/test-functional-local-legacy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/test-functional-local-multiple-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/test-functional-local-native-automation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/test-functional-local-safari.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/test-functional-remote-mobile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test-functional.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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'
Expand All @@ -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
Expand Down

0 comments on commit 7a24bcc

Please sign in to comment.