diff --git a/.github/actions/run_ats/action.yml b/.github/actions/run_ats/action.yml index ef090c553..9e2653617 100644 --- a/.github/actions/run_ats/action.yml +++ b/.github/actions/run_ats/action.yml @@ -46,6 +46,10 @@ runs: run: | echo "pwd: $(pwd)" # FIXME: for debugging TESTS_TO_RUN=$(cat codecov_ats/tests_to_run.txt) + if [ -z "$TESTS_TO_RUN" ]; then + echo "No tests to run, skipping..." + exit 0 + fi echo $TESTS_TO_RUN | xargs uv run pytest --cov \ -o junit_suite_name="${{ github.job }}" \ -n auto \ diff --git a/.github/codecov.yml b/.github/codecov.yml index 6ca52bcc7..5af28a4b7 100644 --- a/.github/codecov.yml +++ b/.github/codecov.yml @@ -16,6 +16,8 @@ component_management: threshold: 0 # Shouldn't remove coverage - type: patch target: 50 # Language specific featues must be 100% covered + flags: + - smart-tests - component_id: codegen-sdk-typescript name: codegen-sdk-typescript paths: @@ -37,30 +39,18 @@ flag_management: statuses: - type: project individual_flags: - - name: smart-tests + - name: unit-tests carryforward: true carryforward_mode: 'labels' statuses: - type: 'project' - type: 'patch' - - name: smart-tests-codemod + - name: codemod-tests carryforward: true carryforward_mode: 'labels' - statuses: - - type: 'project' - - type: 'patch' - - name: smart-tests-codemod-oss + - name: integration-tests carryforward: true carryforward_mode: 'labels' - statuses: - - type: 'project' - - type: 'patch' - - name: smart-tests-integration-tests - carryforward: true - carryforward_mode: 'labels' - statuses: - - type: 'project' - - type: 'patch' comment: layout: "condensed_header, condensed_files" hide_project_coverage: true diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index cc8b62b1e..1aa161a99 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -27,8 +27,8 @@ jobs: codecov_static_token: ${{ secrets.CODECOV_STATIC_TOKEN }} codecov_token: ${{ secrets.CODECOV_TOKEN }} collect_args: "--timeout 5" - codecov_flags: smart-tests - test_codemods: + codecov_flags: unit-tests + codemod-tests: # changing the following value will significantly affect github's cost. Be careful and consult with the team before changing it. runs-on: ubuntu-latest-32 strategy: @@ -58,7 +58,7 @@ jobs: codecov_token: ${{ secrets.CODECOV_TOKEN }} collect_args: "--size=${{matrix.size}} --sync-graph=${{matrix.sync_graph}}" ats_collect_args: "--size=${{matrix.size}},--sync-graph=${{matrix.sync_graph}}," - codecov_flags: smart-tests-codemod-tests-${{matrix.size}}-${{matrix.sync_graph}} + codecov_flags: codemod-tests-${{matrix.size}}-${{matrix.sync_graph}} env: GITHUB_WORKSPACE: $GITHUB_WORKSPACE @@ -186,5 +186,5 @@ jobs: tests/integration/codegen - uses: ./.github/actions/report with: - flag: smart-tests-integration-tests + flag: integration-tests codecov_token: ${{ secrets.CODECOV_TOKEN }}