Skip to content

Commit

Permalink
address small comments on debug and codecov.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
giovanni-guidini committed Oct 13, 2023
1 parent 3b8238d commit 5c959bc
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/codecov_ats.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

defaults:
run:
# the default default is:
# bash --noprofile --norc -eo pipefail {0}
shell: bash --noprofile --norc -eo pipefail -ux {0}

jobs:
files-changed:
name: detect what files changed
Expand Down Expand Up @@ -67,7 +73,7 @@ jobs:
pg-version: 14
- name: Download Codecov CLI
run: |
pip install --extra-index-url https://pypi.org/simple --no-cache-dir codecov-cli
pip install --extra-index-url https://pypi.org/simple --no-cache-dir codecov-cli==0.3.8
# Creates the commit and report objects in codecov
- name: Codecov startup
run: |
Expand Down Expand Up @@ -98,6 +104,9 @@ jobs:
output=$(codecovcli --codecov-yml-path=codecov.yml label-analysis --dry-run --token=${CODECOV_STATIC_TOKEN} --base-sha=${BASE_COMMIT}) || true
if [ -n "${output}" ];
then
# TODO: With https://github.com/codecov/codecov-cli/pull/292 there will be an option to get JSON output
# Directly from codecov cli and this json_output will be unecessary
# But while pinned to codecov-cli==0.3.8 this is needed
json_output=$(echo $output | grep -o -e "{.*}")
echo ATS_TESTS_TO_RUN=$(jq <<< $json_output '.runner_options + .ats_tests_to_run | map(@sh) | join(" ")' --raw-output) >> "$GITHUB_OUTPUT"
Expand All @@ -123,7 +132,7 @@ jobs:
steps:
- name: Debug ATS_TESTS_TO_RUN
run: |
echo ${{ needs.coverage-ats.outputs.ATS_TESTS_TO_RUN }}
: ${{ needs.coverage-ats.outputs.ATS_TESTS_TO_RUN }}
- name: Debug ATS_TESTS_TO_SKIP
run: |
echo ${{ needs.coverage-ats.outputs.ATS_TESTS_TO_SKIP }}
: ${{ needs.coverage-ats.outputs.ATS_TESTS_TO_SKIP }}
3 changes: 3 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,15 @@ comment:
require_base: true # must have a base report to post
require_head: true # must have a head report to post

# https://docs.codecov.com/docs/flags#two-approaches-to-flag-management
flag_management:
individual_flags:
- name: smart-tests
carryforward: true
# https://docs.codecov.com/docs/getting-started-with-ats#step-2-configure-the-codecovyml-for-automated-test-selection
carryforward_mode: "labels"
statuses:
# https://github.com/codecov/shared/blob/main/shared/validation/user_schema.py#L310
- type: "patch"
enabled: false

Expand Down

0 comments on commit 5c959bc

Please sign in to comment.