0

I am trying to integrate CodeCov in CircleCI, but the command

bash <(curl -s https://codecov.io/bash)

returns

The '<' operator is reserved for future use. when executed in the pipeline.

I am following the documentation that I found for

My config.yml has the following steps:

steps:
      - checkout
      - run:
          name: "Run Unit Tests"
          command: dotnet.exe test ./UnitTests --collect:"XPlat Code Coverage"
      - run:
          name: Upload CodeCov.io Data
          command: bash <(curl -s https://codecov.io/bash)
          when: always # Uploads code coverage results, pass or fail

I have also tried with just curl -s https://codecov.io/bash but in this way I get the error Invoke-WebRequest : Cannot process command because of one or more missing mandatory parameters: Uri.

Has anyone of you made this integration?

Thank you

2 Answers2

0

Update:

I had to add the .exe to the curl command:

- run:
    name: Upload Coverage Results
    command: curl.exe -s https://codecov.io/bash | bash -s --
    when: "always"

Now it builds but can't find the report.

==> Circle CI detected. 
    project root: C:/Users/circleci/project 
    Yaml not found, that's ok! Learn more at http://docs.codecov.io/docs/codecov-yaml 
==> Running gcov in C:/Users/circleci/project (disable via -X gcov) 
FIND: Parameter format not correct
 
==> Python coveragepy not found 
==> Searching for coverage reports in: 
    + C:/Users/circleci/project 
--> No coverage report found. 
    Please visit http://docs.codecov.io/docs/supported-languages 
CircleCI received exit code 0
  • you can specify a path to the report you want to upload with `-f` flag: `-f "app/path/to/coverage/file.xml`. – Tony Jul 14 '20 at 19:41
0

“The '<' operator is reserved for future use.”

Try to run your command as shown below:

cmd /c "<your command>"
Murat Yıldız
  • 11,299
  • 6
  • 63
  • 63