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

No docs on what to pass for `--swift-project`

Open dabrahams opened this issue 2 years ago • 3 comments

Docs don't tell me the meaning of the argument. Am I expected to pass the name of my Package.swift file, the target name, or what?

Thanks

dabrahams avatar Aug 02 '23 00:08 dabrahams

      - name: Upload coverage to Codecov
        uses: codecov/[email protected]
        with:
          swift: true
          swift_project: SWDestinyTrades
          verbose: true    

dogo avatar Nov 16 '23 17:11 dogo

Is that supposed to answer my question? It doesn't. How is the name SWDestinyTrades correlated to the names of files, targets, etc. in the project being tested? Or, is it a completely arbitrary label?

dabrahams avatar Feb 27 '24 19:02 dabrahams

As far as I can tell from experimentation, the swift_project parameter is completely unnecessary and the safest thing (since its meaning is undocumented) is to omit it. IMO if you're not going to document its meaning you should remove it from the documentation so it doesn't throw people (like me) off.

dabrahams avatar Apr 24 '24 21:04 dabrahams

@dabrahams you're right, the docs could be better here. swift_project is not necessary, it is meant to be a helper to speed up processing. If you do decide to use it, it should be the name of your Swift project.

You can see in the code where it is used here. I believe that the name of the project really means the root of a file that may end in app', 'framework', 'xctest'. As an example, using swift_project: MyProject would pattern match to MyProject.app, but not NotMyProject.app.

thomasrockhu-codecov avatar Jun 18 '24 16:06 thomasrockhu-codecov