Skip to content

Commit

Permalink
chore: clean FAILED_TESTS_ARE_FLAKY variable in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
RomanBredehoft committed Oct 9, 2023
1 parent 714341e commit 866bd39
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/continuous-integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
FAILED_TESTS_ARE_FLAKY: "false"

jobs:
matrix-preparation:
Expand Down Expand Up @@ -707,6 +706,8 @@ jobs:
run: |
make pytest_and_report
FAILED_TESTS_ARE_FLAKY="false"
# If regular tests failed, check for flaky tests
if [ $? -ne 0 ]; then
Expand All @@ -718,7 +719,6 @@ jobs:
# Check if all failed tests are known flaky tests
FAILED_TESTS_ARE_FLAKY=$(jq .all_failed_tests_are_flaky "failed_tests_report.json")
echo "FAILED_TESTS_ARE_FLAKY=FAILED_TESTS_ARE_FLAKY" >> "$GITHUB_ENV"
# If all failed tests are known flaky tests, try to re-run them
if [[ "${FAILED_TESTS_ARE_FLAKY}" == "true" ]]; then
Expand All @@ -730,6 +730,8 @@ jobs:
fi
fi
echo "FAILED_TESTS_ARE_FLAKY=${FAILED_TESTS_ARE_FLAKY}" >> "$GITHUB_ENV"
# If regular tests passed but at least one known flaky test have been re-run, a warning
# comment is published in the PR and all flaky tests that initially failed are listed
- name: Warn PR with flaky tests
Expand Down

0 comments on commit 866bd39

Please sign in to comment.