问题描述
在Github Actions CI管道上构建后,我试图运行dotnet test
来生成代码覆盖率xml报告。但是,测试在管道上失败并显示错误。
下面是错误响应的展示;
这是 windows-latest 作为跑步者的任务
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.301
- name: Setup OpenCover
uses: crazy-max/ghaction-chocolatey@v1
with:
args: -h
- name: Install dependencies
run: |
dir
dotnet add package coverlet.collector
choco install opencover.portable
choco install codecov
- name: Run restore
run: dotnet restore
- name: Run build
run: dotnet build
- name: Run test and generate code coverage
run: dotnet test .\Crossroads.UnitTests\Crossroads.UnitTests.csproj --collect:"XPlat Code Coverage"
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
flags: unittests
fail_ci_if_error: true
修正尝试
请给我一些帮助或建议,我们将不胜感激。预先感谢。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)