Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Problem running project against an annotated git tag #195

Open
alexanderkjall opened this issue Dec 12, 2024 · 0 comments
Open

Problem running project against an annotated git tag #195

alexanderkjall opened this issue Dec 12, 2024 · 0 comments

Comments

@alexanderkjall
Copy link

When running the project against an annotated tag, this tool seems to think the hash belongs to a commit and fails when it can't access it.

Output from a run where it fails:

Run MishaKav/pytest-coverage-comment@main
  with:
    github-token: ***
    pytest-xml-coverage-path: coverage.xml
    junitxml-path: pytest.xml
    pytest-coverage-path: ./pytest-coverage.txt
    title: Coverage Report
    badge-title: Coverage
    hide-badge: false
    hide-report: false
    hide-comment: false
    xml-skip-covered: false
    report-only-changed-files: false
    create-new-comment: false
    default-branch: main
    remove-link-from-badge: false
  env:
    pythonLocation: /opt/hostedtoolcache/Python/3.12.7/x64
    PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.12.7/x64/lib/pkgconfig
    Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.7/x64
    Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.7/x64
    Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.7/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.12.7/x64/lib
File read successfully "/home/runner/work/<projectname>/<projectname>/coverage.xml"
Generating coverage report
File read successfully "/home/runner/work/<projectname>/<projectname>/pytest.xml"
File read successfully "/home/runner/work/<projectname>/<projectname>/pytest.xml"
errors: 0
failures: 0
skipped: 0
tests: 45
time: 3.557
File read successfully "/home/runner/work/<projectname>/<projectname>/pytest.xml"
coverage.xml
  coverage: 37%
  color: red
Create commit comment
Error: HttpError: No commit found for SHA: 4d92b4a7f9b07849f408391d1bfad3e13fdd1a96
Error: No commit found for SHA: 4d92b4a7f9b07849f408391d1bfad3e13fdd1a96

The workflow was triggered by pushing a tag to github:

git tag -s v0.2.5 -m "Version 0.2.5, test new pipeline workflow version" -a && git push origin tag v0.2.5

And the hash 4d92b4a7f9b07849f408391d1bfad3e13fdd1a96 can be verified to belong to a git tag:

git show-ref --tags | rg 4d92b4a7f9b07849f408391d1bfad3e13fdd1a96
4d92b4a7f9b07849f408391d1bfad3e13fdd1a96 refs/tags/v0.2.5
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant