codecov 在 github 操作中失败
codecov fails in github actions
背景
到目前为止,我的 codecov 设置运行良好
- 您可以定期更新每个 pr 提交 here
- 我没有更改我的回购设置
因为我不小心推了一个我不应该推的文件夹,
然后我合并了一个 pr 以删除所述文件夹
这是我的codecov.yml
问题
- 在上述 github 操作上方链接的最后一个 pr ci 抱怨了下面的日志
_____ _
/ ____| | |
| | ___ __| | ___ ___ _____ __
| | / _ \ / _` |/ _ \/ __/ _ \ \ / /
| |___| (_) | (_| | __/ (_| (_) \ V /
\_____\___/ \__,_|\___|\___\___/ \_/
Bash-1.0.3
==> git version 2.31.1 found
==> curl 7.68.0 (x86_64-pc-linux-gnu) libcurl/7.68.0 OpenSSL/1.1.1f zlib/1.2.11 brotli/1.0.7 libidn2/2.2.0 libpsl/0.21.0 (+libidn2/2.2.0) libssh/0.9.3/openssl/zlib nghttp2/1.40.0 librtmp/2.3
Release-Date: 2020-01-08
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: AsynchDNS brotli GSS-API HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz NTLM NTLM_WB PSL SPNEGO SSL TLS-SRP UnixSockets
==> GitHub Actions detected.
Env vars used:
-> GITHUB_ACTIONS: true
-> GITHUB_HEAD_REF: remove-speedtest
-> GITHUB_REF: refs/pull/136/merge
-> GITHUB_REPOSITORY: iapicca/yak_packages
-> GITHUB_RUN_ID: {{I'll keep this for myself}}
-> GITHUB_SHA: {{I'll keep this for myself}}
-> GITHUB_WORKFLOW: CI
-> Issue detecting commit SHA. Please run actions/checkout with fetch-depth > 1 or set to 0
project root: .
Yaml found at: codecov.yml
==> Running gcov in . (disable via -X gcov)
==> Python coveragepy not found
==> Searching for coverage reports in:
+ .
-> Found 7 reports
==> Detecting git/mercurial file structure
==> Reading reports
+ ./packages/yak_tween/coverage/lcov.info bytes=2228
+ ./packages/yak_utils/coverage.lcov bytes=687
+ ./packages/yak_test/coverage.lcov bytes=339
+ ./packages/stub/coverage.lcov bytes=678
+ ./packages/yak_runner/coverage.lcov bytes=6429
+ ./packages/yak_widgets/coverage/lcov.info bytes=1444
+ ./packages/yak_error_handler/coverage.lcov bytes=1017
==> Appending adjustments
https://docs.codecov.io/docs/fixing-reports
+ Found adjustments
==> Gzipping contents
8.0K /tmp/codecov.yP3SSF.gz
==> Uploading reports
url: https://codecov.io
query: branch=remove-speedtest&commit={{I'll keep this for myself}}
&build={{I'll keep this for myself}}&build_url=http%3A%2F%2Fgithub.com%2Fiapicca%2Fyak_packages%2Factions%2Fruns%2F911981303&name=&tag=&slug=iapicca%2Fyak_packages&service=github-actions&flags=&pr=136&job=CI&cmd_args=
-> Pinging Codecov
https://codecov.io/upload/v4?package=bash-1.0.3&token=secret&branch=remove-speedtest&commit={{I'll keep this for myself}}&build={{I'll keep this for myself}}&build_url=http%3A%2F%2Fgithub.com%2Fiapicca%2Fyak_packages%2Factions%2Fruns%2F911981303&name=&tag=&slug=iapicca%2Fyak_packages&service=github-actions&flags=&pr=136&job=CI&cmd_args=
{'detail': ErrorDetail(string='Unable to locate build via Github Actions API. Please upload with the Codecov repository upload token to resolve issue.', code='not_found')}
404
==> Uploading to Codecov
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 5026 100 171 100 4855 1000 28391 --:--:-- --:--:-- --:--:-- 29220
100 5026 100 171 100 4855 1000 28391 --:--:-- --:--:-- --:--:-- 29220
{'detail': ErrorDetail(string='Unable to locate build via Github Actions API. Please upload with the Codecov repository upload token to resolve issue.', code='not_found')}
- 建议的修复对我来说很晦涩
{'detail': ErrorDetail(string='Unable to locate build via Github Actions API. Please upload with the Codecov repository upload token to resolve issue.', code='not_found')}
要求
因为我真的不想运行任何本地的东西有人可以帮我解决这个问题
CI
里面
谢谢
Codecov 有一些海森堡问题。如果您没有令牌,请添加一个,否则尝试:
- 强制按下以重新触发 Codecov
- 旋转你的代币。
刷新我的 codecov 令牌并重新安装插件对我有用。
我今天 运行 讨论这个问题。
似乎与 Issue #330 从他们的 GitHub 页面被跟踪有关。
最后一条评论(截至撰写本文时)表明该问题应该在大约一个小时前解决,但我最新的 PR 仍然 运行 包含其中。如果我可以确认它已为我修复,我将 post 进行更新。
更新: 这已通过 codecov 操作的 release of version 1.5.2 修复。
注意:
这个答案指的是新的uploader. You an also use codecov
's action。
尽管我 steps
设置正确,但我还是失败了 builds。在我的例子中,修复构建的是在上传器 link 中将“alpine”更改为“linux”,并明确提供一个名为 CODECOV_TOKEN
.
的环境变量
- name: Upload reports to codecov
env:
CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}}
run: |
curl -Os https://uploader.codecov.io/latest/linux/codecov
find . -iregex "codecov.*"
chmod +x codecov
./codecov -t ${CODECOV_TOKEN}
在 this 存储库中查看整个工作流程文件。
背景
到目前为止,我的 codecov 设置运行良好
- 您可以定期更新每个 pr 提交 here
- 我没有更改我的回购设置
因为我不小心推了一个我不应该推的文件夹,
然后我合并了一个 pr 以删除所述文件夹这是我的codecov.yml
问题
- 在上述 github 操作上方链接的最后一个 pr ci 抱怨了下面的日志
_____ _
/ ____| | |
| | ___ __| | ___ ___ _____ __
| | / _ \ / _` |/ _ \/ __/ _ \ \ / /
| |___| (_) | (_| | __/ (_| (_) \ V /
\_____\___/ \__,_|\___|\___\___/ \_/
Bash-1.0.3
==> git version 2.31.1 found
==> curl 7.68.0 (x86_64-pc-linux-gnu) libcurl/7.68.0 OpenSSL/1.1.1f zlib/1.2.11 brotli/1.0.7 libidn2/2.2.0 libpsl/0.21.0 (+libidn2/2.2.0) libssh/0.9.3/openssl/zlib nghttp2/1.40.0 librtmp/2.3
Release-Date: 2020-01-08
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: AsynchDNS brotli GSS-API HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz NTLM NTLM_WB PSL SPNEGO SSL TLS-SRP UnixSockets
==> GitHub Actions detected.
Env vars used:
-> GITHUB_ACTIONS: true
-> GITHUB_HEAD_REF: remove-speedtest
-> GITHUB_REF: refs/pull/136/merge
-> GITHUB_REPOSITORY: iapicca/yak_packages
-> GITHUB_RUN_ID: {{I'll keep this for myself}}
-> GITHUB_SHA: {{I'll keep this for myself}}
-> GITHUB_WORKFLOW: CI
-> Issue detecting commit SHA. Please run actions/checkout with fetch-depth > 1 or set to 0
project root: .
Yaml found at: codecov.yml
==> Running gcov in . (disable via -X gcov)
==> Python coveragepy not found
==> Searching for coverage reports in:
+ .
-> Found 7 reports
==> Detecting git/mercurial file structure
==> Reading reports
+ ./packages/yak_tween/coverage/lcov.info bytes=2228
+ ./packages/yak_utils/coverage.lcov bytes=687
+ ./packages/yak_test/coverage.lcov bytes=339
+ ./packages/stub/coverage.lcov bytes=678
+ ./packages/yak_runner/coverage.lcov bytes=6429
+ ./packages/yak_widgets/coverage/lcov.info bytes=1444
+ ./packages/yak_error_handler/coverage.lcov bytes=1017
==> Appending adjustments
https://docs.codecov.io/docs/fixing-reports
+ Found adjustments
==> Gzipping contents
8.0K /tmp/codecov.yP3SSF.gz
==> Uploading reports
url: https://codecov.io
query: branch=remove-speedtest&commit={{I'll keep this for myself}}
&build={{I'll keep this for myself}}&build_url=http%3A%2F%2Fgithub.com%2Fiapicca%2Fyak_packages%2Factions%2Fruns%2F911981303&name=&tag=&slug=iapicca%2Fyak_packages&service=github-actions&flags=&pr=136&job=CI&cmd_args=
-> Pinging Codecov
https://codecov.io/upload/v4?package=bash-1.0.3&token=secret&branch=remove-speedtest&commit={{I'll keep this for myself}}&build={{I'll keep this for myself}}&build_url=http%3A%2F%2Fgithub.com%2Fiapicca%2Fyak_packages%2Factions%2Fruns%2F911981303&name=&tag=&slug=iapicca%2Fyak_packages&service=github-actions&flags=&pr=136&job=CI&cmd_args=
{'detail': ErrorDetail(string='Unable to locate build via Github Actions API. Please upload with the Codecov repository upload token to resolve issue.', code='not_found')}
404
==> Uploading to Codecov
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 5026 100 171 100 4855 1000 28391 --:--:-- --:--:-- --:--:-- 29220
100 5026 100 171 100 4855 1000 28391 --:--:-- --:--:-- --:--:-- 29220
{'detail': ErrorDetail(string='Unable to locate build via Github Actions API. Please upload with the Codecov repository upload token to resolve issue.', code='not_found')}
- 建议的修复对我来说很晦涩
{'detail': ErrorDetail(string='Unable to locate build via Github Actions API. Please upload with the Codecov repository upload token to resolve issue.', code='not_found')}
要求
因为我真的不想运行任何本地的东西有人可以帮我解决这个问题 CI
里面谢谢
Codecov 有一些海森堡问题。如果您没有令牌,请添加一个,否则尝试:
- 强制按下以重新触发 Codecov
- 旋转你的代币。
刷新我的 codecov 令牌并重新安装插件对我有用。
我今天 运行 讨论这个问题。
似乎与 Issue #330 从他们的 GitHub 页面被跟踪有关。
最后一条评论(截至撰写本文时)表明该问题应该在大约一个小时前解决,但我最新的 PR 仍然 运行 包含其中。如果我可以确认它已为我修复,我将 post 进行更新。
更新: 这已通过 codecov 操作的 release of version 1.5.2 修复。
注意:
这个答案指的是新的uploader. You an also use codecov
's action。
尽管我 steps
设置正确,但我还是失败了 builds。在我的例子中,修复构建的是在上传器 link 中将“alpine”更改为“linux”,并明确提供一个名为 CODECOV_TOKEN
.
- name: Upload reports to codecov
env:
CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}}
run: |
curl -Os https://uploader.codecov.io/latest/linux/codecov
find . -iregex "codecov.*"
chmod +x codecov
./codecov -t ${CODECOV_TOKEN}
在 this 存储库中查看整个工作流程文件。