codecov-action icon indicating copy to clipboard operation
codecov-action copied to clipboard

Seems the f flag in cli v4 is ignored

Open Jonatha1983 opened this issue 1 year ago • 6 comments

I upgraded to v4 but it looks like the -f flag that I use during my ci is not taken in consideration:

/home/runner/work/_actions/codecov/codecov-action/v4/dist/codecov do-upload -f /home/runner/work/codecov/codecov/build/reports/kover/report.xml -F unittests -C 3824466a7182bc04aa44f514b33203d392fff0ce
info - 2024-02-10 13:36:52,964 -- ci service found: github-actions
warning - 2024-02-10 13:36:52,978 -- xcrun is not installed or can't be found.
warning - 2024-02-10 13:36:53,003 -- No gcov data found.
warning - 2024-02-10 13:36:53,004 -- coverage.py is not installed or can't be found.
info - 2024-02-10 13:36:53,050 -- Found 10 coverage files to upload
info - 2024-02-10 13:36:53,050 -- > /home/runner/work/codecov/codecov/src/test/testData/rename/codecov.yaml
info - 2024-02-10 13:36:53,050 -- > /home/runner/work/codecov/codecov/codecov.yaml
info - 2024-02-10 13:36:53,050 -- > /home/runner/work/codecov/codecov/build/test-results/test/TEST-com.github.codecov.i18n.CodecovBundleTest.xml
info - 2024-02-10 13:36:53,051 -- > /home/runner/work/codecov/codecov/src/main/resources/schemas/codecov.json
info - 2024-02-10 13:36:53,051 -- > /home/runner/work/codecov/codecov/build/instrumented/instrumentCode/META-INF/codecov.kotlin_module
info - 2024-02-10 13:36:53,0[51](https://github.com/edgafner/codecov/actions/runs/7855232456/job/21436779456#step:8:52) -- > /home/runner/work/codecov/codecov/build/classes/kotlin/main/META-INF/codecov.kotlin_module
info - 2024-02-10 13:36:53,051 -- > /home/runner/work/codecov/codecov/build/reports/kover/report.xml
info - 2024-02-10 13:36:[53](https://github.com/edgafner/codecov/actions/runs/7855232456/job/21436779456#step:8:54),051 -- > /home/runner/work/codecov/codecov/build/resources/main/schemas/codecov.json
info - 2024-02-10 13:36:53,051 -- > /home/runner/work/codecov/codecov/build/test-results/test/TEST-com.github.codecov.settings.CodecovProjectSettingsTest.xml
info - 2024-02-10 13:36:53,051 -- > /home/runner/work/codecov/codecov/build/tmp/instrumentCode/META-INF/codecov.kotlin_module

It is printing other files that is going to upload

Jonatha1983 avatar Feb 10 '24 13:02 Jonatha1983

I have the same problem after updating to v4.

lukasberbuer avatar Feb 10 '24 19:02 lukasberbuer

I can confirm this issue. -f is ignored and the coverage of all packages in my monorepo uploaded instead.

DerYeger avatar Feb 11 '24 07:02 DerYeger

Hi 👋🏽 PM from Codecov here

Can you confirm if there are existing exclusion patterns that y'all are using? We have a known issue that ignores files specified if the file is within an exclusion pattern specified. We're working on fixing that, was wondering if that might be what is going on here https://github.com/codecov/engineering-team/issues/1143

rohan-at-sentry avatar Feb 12 '24 16:02 rohan-at-sentry

Hi 👋🏽 PM from Codecov here

Can you confirm if there are existing exclusion patterns that y'all are using? We have a known issue that ignores files specified if the file is within an exclusion pattern specified. We're working on fixing that, was wondering if that might be what is going on here codecov/engineering-team#1143

Here's a snippet of my action. I don't think that I've specified any exclusion pattern: https://github.com/DerYeger/yeger/blob/992979f803071a67eeb5299fa93932bbf309f086/.github/workflows/ci.yml#L33

Here's my codecov.yml:

coverage:
  range: 0..100
  round: down
  precision: 2
  status:
    project:
      default:
        target: 0
        threshold: 5
        base: auto
    patch:
      default:
        target: 0
        threshold: 5
        base: auto

DerYeger avatar Feb 12 '24 16:02 DerYeger

I do have excluded pattern will post them soon

Jonatha1983 avatar Feb 12 '24 16:02 Jonatha1983

I don't have an exclusion pattern either:

      - name: Upload coverage reports to Codecov
        uses: codecov/codecov-action@v4
        with:
          token: ${{ secrets.CODECOV_TOKEN }}
          files: build/coverage.xml

https://github.com/open62541pp/open62541pp/blob/master/.github/workflows/ci.yml#L53-L85

lukasberbuer avatar Feb 12 '24 17:02 lukasberbuer