Closed gerw closed 6 months ago
Am I being crazy? Why does pytest
fails exactly at the line which I have changed? Does it test the previous version of the code?
🤔 Can you try to rebase onto main? Maybe something went wrong there !?
I think there is nothing to rebase here. This PR is directly one commit below main, isn't it?
I've just checked, your branch is up to date with the upstream main branch except the single line change.
But I think I found the issue, the CI job does a check out of the main branch, not your PR branch fix150:
https://github.com/Bouni/python-luxtronik/actions/runs/7785513708/job/21228279923?pr=151#step:2:51
Fetching the repository
/usr/bin/git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin +3d94a5903fe1e104531bd481e4277dfc11668f1a:refs/remotes/origin/main
Now, the publishing of the code coverage seems to fail. I think we already had this issue at some time in the past?
I'll look into it tomorrow
Guess I found a solution:
https://github.com/MishaKav/pytest-coverage-comment/issues/68#issuecomment-1229144760
Will add the permissions tomorrow
Ok, Chat GPT sucks as it proposed wrong inputs for the coverage action 🤦🏽♂️ I simply don't understand why it works if I do a PR but not for you ...
Maybe because I'm the owner of the repo and you just a contributer!?
I'll try to find another solution ...
No, I think that the problem is that your PRs come directly from this repo, but my PR come from a different repo. In principle, everybody could file a PR with (potentially malicious) code and this should not be executed with the permissions of this repo.
What happens if you change repo-token
to github-token
?
I don't know, lets try.
I just changed the actions settings in the hope that it fixes the problem, can you do git commit --allow-empty -m "Trigger-CI"
to see if that works?
Now, the workflows seem to fail already at startup...
Ok then I'll put the settings back to original and continue to search for a solution
I guess I found the answer in this blog post
https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
I'll try to create a two staged coverage ci workflow tomorrow
@gerw Now everything runs but MishaKav/pytest-coverage-comment@main
gives this error:
Warning: This action supports comments only on `pull_request`, `pull_request_target`, `push` and `workflow_dispatch` events. `workflow_run` events are not supported.
So still no coverage report for forked repo PRs but at least the pytest CI workflow works.
I'll see if I can fix this somehow. Anyway, now we can continue with the real work on python-luxtronik
🥳
Fixes #150