Skip to content

Commit

Permalink
ci: fix post-processing of label analysis. Let it fail.
Browse files Browse the repository at this point in the history
Fixing the post processing of label analysis failure based on POC runs
(see https://github.com/giovanni-guidini/components-demo/actions/runs/6579967512/job/17876943612 for the end result)

The strange syntax came from github/docs#21529

Also letting label-analysis step fail (_after_ the post processing)
  • Loading branch information
giovanni-guidini committed Oct 19, 2023
1 parent 6c9c948 commit d449b52
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions .github/workflows/codecov_ats.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ jobs:
# The base commit will be the parent commit (apparently commits on master don't exist in codecov)
- name: Codecov Automated Test Selection
id: codecov_automated_test_selection
continue-on-error: true
run: |
BASE_COMMIT=$(git rev-parse ${{ github.sha }}^)
echo $BASE_COMMIT
Expand All @@ -116,22 +115,22 @@ jobs:
tee <<< "ATS failed. Can't get list of tests to run. Fallback to all tests" "$GITHUB_STEP_SUMMARY"
# We need not forget to add the search options in the fallback command, otherwise pytest might run more tests than expected
# These search options match what's defined in codecov.yml:105
cat >> "$GITHUB_OUTPUT" <<EOF
ATS_TESTS_TO_RUN=$(
jq -c @json <<< '[
"--cov-context=test",
"tests/sentry",
"tests/integration",
"--ignore=tests/sentry/eventstream/kafka",
"--ignore=tests/sentry/post_process_forwarder",
"--ignore=tests/sentry/snuba",
"--ignore=tests/sentry/search/events",
"--ignore=tests/sentry/ingest/ingest_consumer/test_ingest_consumer_kafka.py",
"--ignore=tests/sentry/region_to_control/test_region_to_control_kafka.py"
]'
)
ATS_TESTS_TO_SKIP='[]'
EOF
echo 'ATS_TESTS_TO_RUN<<EOF' >> $GITHUB_OUTPUT
jq -c @json <<< '[
"--cov-context=test",
"tests/sentry",
"tests/integration",
"--ignore=tests/sentry/eventstream/kafka",
"--ignore=tests/sentry/post_process_forwarder",
"--ignore=tests/sentry/snuba",
"--ignore=tests/sentry/search/events",
"--ignore=tests/sentry/ingest/ingest_consumer/test_ingest_consumer_kafka.py",
"--ignore=tests/sentry/region_to_control/test_region_to_control_kafka.py"
]' >> $GITHUB_OUTPUT
echo 'EOF' >> $GITHUB_OUTPUT
echo ATS_TESTS_TO_SKIP="'[]'" >> "$GITHUB_OUTPUT"
echo "::error ATS failed"
exit 1
fi
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
Expand All @@ -141,6 +140,7 @@ jobs:
debug:
runs-on: ubuntu-latest
needs: coverage-ats
if: ${{ always() }}
steps:
- name: Debug ATS_TESTS_TO_RUN
run: |
Expand Down

0 comments on commit d449b52

Please sign in to comment.