curl CircleCi和CodeCov:'< '运算符保留供将来使用

23c0lvtd  于 2023-05-18  发布在  其他
关注(0)|答案(2)|浏览(151)

我尝试将CodeCov集成到CircleCI中,但命令
bash <(curl -s https://codecov.io/bash)
退货
The '<' operator is reserved for future use.在流水线中执行时。
我正在遵循我找到的

我的config.yml有以下步骤:

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

我也试过只使用curl -s https://codecov.io/bash,但这样我得到错误Invoke-WebRequest : Cannot process command because of one or more missing mandatory parameters: Uri.
你们中有人做过这种整合吗?
谢谢你

ukqbszuj

ukqbszuj1#

更新:
我不得不将.exe添加到curl命令中:

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

现在,它正在构建,但找不到报告。

==> 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
iezvtpos

iezvtpos2#

  • “'<'运算符保留供将来使用。"*

尝试运行命令,如下所示:

cmd /c "<your command>"

相关问题