-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
8 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -385,23 +385,23 @@ jobs: | |
echo "summary=$summary" >> $GITHUB_OUTPUT | ||
|
||
- name: Upload All Test Results as Artifact | ||
if: ${{ always() && fromJSON(steps.results.outputs.summary).total_tests > 0 }} | ||
if: ${{ (success() || failure()) && fromJSON(steps.results.outputs.summary).total_tests > 0 }} | ||
uses: actions/[email protected] | ||
with: | ||
path: ./flakeguard-report/all-test-results.json | ||
name: all-test-results.json | ||
retention-days: 90 | ||
|
||
- name: Upload Failed Test Results as Artifact | ||
if: ${{ always() && fromJSON(steps.results.outputs.summary).failed_runs > 0 }} | ||
if: ${{ (success() || failure()) && fromJSON(steps.results.outputs.summary).failed_runs > 0 }} | ||
uses: actions/[email protected] | ||
with: | ||
path: ./flakeguard-report/failed-test-results.json | ||
name: failed-test-results.json | ||
retention-days: 90 | ||
|
||
- name: Upload Failed Test Results With Logs as Artifact | ||
if: ${{ always() && fromJSON(steps.results.outputs.summary).failed_runs > 0 }} | ||
if: ${{ (success() || failure()) && fromJSON(steps.results.outputs.summary).failed_runs > 0 }} | ||
uses: actions/[email protected] | ||
with: | ||
path: ./flakeguard-report/failed-test-results-with-logs.json | ||
|
@@ -410,7 +410,7 @@ jobs: | |
|
||
- name: Generate Flakeguard Reports | ||
shell: bash | ||
if: always() | ||
if: success() || failure() | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | ||
run: | | ||
|
@@ -453,7 +453,7 @@ jobs: | |
fi | ||
|
||
- name: Add Github Summary | ||
if: always() | ||
if: (success() || failure()) | ||
run: | | ||
FILE_SIZE=$(wc -c < ./flakeguard-report/all-test-summary.md) | ||
echo "File size: $FILE_SIZE bytes" | ||
|
@@ -468,7 +468,7 @@ jobs: | |
fi | ||
- name: Post comment on PR if flaky tests found | ||
if: ${{ always() && fromJSON(steps.results.outputs.summary).flaky_tests > 0 && github.event_name == 'pull_request' }} | ||
if: ${{ (success() || failure()) && fromJSON(steps.results.outputs.summary).flaky_tests > 0 && github.event_name == 'pull_request' }} | ||
uses: actions/github-script@v7 | ||
continue-on-error: true | ||
with: | ||
|
@@ -485,7 +485,7 @@ jobs: | |
}); | ||
- name: Send Slack message for failed tests | ||
if: ${{ always() && inputs.slackNotificationAfterTestsChannelId != '' && fromJSON(steps.results.outputs.summary).flaky_tests > 0 }} | ||
if: ${{ (success() || failure()) && inputs.slackNotificationAfterTestsChannelId != '' && fromJSON(steps.results.outputs.summary).flaky_tests > 0 }} | ||
uses: slackapi/slack-github-action@6c661ce58804a1a20f6dc5fbee7f0381b469e001 # v1.25.0 | ||
env: | ||
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} | ||
|
@@ -538,7 +538,7 @@ jobs: | |
- name: Send general Slack message | ||
uses: slackapi/slack-github-action@6c661ce58804a1a20f6dc5fbee7f0381b469e001 # v1.25.0 | ||
if: ${{ always() && inputs.slackNotificationAfterTestsChannelId != '' && fromJSON(steps.results.outputs.summary).flaky_tests == 0 && fromJSON(steps.results.outputs.summary).total_tests > 0 }} | ||
if: ${{ (success() || failure()) && inputs.slackNotificationAfterTestsChannelId != '' && fromJSON(steps.results.outputs.summary).flaky_tests == 0 && fromJSON(steps.results.outputs.summary).total_tests > 0 }} | ||
id: slack | ||
env: | ||
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} | ||
|