-
Notifications
You must be signed in to change notification settings - Fork 217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fatal: Not a git repository #131
Comments
Well, this is really weird. This action uses git to get a list of your tracked source files. For failed tests, it looks at the stack trace and the list of tracked files. The first row in the stack trace that points to any of tracked files is where the annotation will be created. In your case, I see two possible errors:
I would recommend checking the working directory and the existence of the |
I figured it out. I had to add git init after I checked out the code.
|
You found a workaround to make this action pass, but I'm not entirely sure it will work correctly. Could you please check if you have something similar in your logs from the checkout action?
I already have a code that can list tracked files from GitHub REST API. However, it's used only when test results are received from artifacts. A proper solution would be to use the REST API also if the working folder is not a git repository. |
Hi! Can we have a flag to disable any usage of git? (eg: disableAnnotations: true) The use case is: I have a job for deployment, where I only need build related artifacts. I run the tests after deployment on the given environment. Ideally I do not want to checkout the source code. |
Yes, I can add this option. Hopefully next week. Shouldn't be much work |
@dorny did you have a chance to added this flag? I am also struggeling to just have a workaround git repo on my report summary job. Since I am only checking out code in a build stage but hand over all artifacts over the pipeline. I am doing integration tests I shouldn't need to checkout anything. |
@SebastianSchuetze you can use working-directory to set the dir where you checkout your code |
I too would love this flag Also it seems like a weird dependency to have on git. You're building a test-report, not performing git operations. In my process I also discovered it break on some build-images, because git is not installed (which can also explain the usage of the REST API). It's strange having to install an extra unrelated tool for this task |
For me this flag is crucial for use with e2e tests. I use Detox with React-Native and Jest runner. So the report is getting generated with failed tests. But since the test code is not attached to any real app code, annotations fail to generate. Disabling them would make it possible to include the e2e tests report into PR. |
@rohde-januar @antonandreyev |
I think the cause is being inside container:
Same for me with Alpine |
Thanks, that worked. Maybe would be nice to update the docs and suggest this until (if) the |
If anyone like me checkouts to subfolder, there is a solution, e.g. for a path
It won't work with |
…/test-reporter#131 (comment)> and <actions/runner#2033>. git-svn-id: https://source.openmpt.org/svn/openmpt/trunk/OpenMPT@20679 56274372-70c3-4bfc-bfc3-4c3a0b034d27
[New] build: CI: GitHub: Add Fedora builder. ........ [Fix] build: CI: GitHub: Fedora: Fix xz dependency install. ........ [Fix] build: CI: GitHub: Fedora: Workaround GitHub quirks. See <dorny/test-reporter#131 (comment)> and <actions/runner#2033>. ........ [Imp] build: CI: GitHub: Fedora: Add matrix build for dependencies. ........ [New] build: CI: GitHub: Add Fedora Autotools builder. ........ [New] build: CI: GitHub: Add Fedora MinGW cross-compile builder. ........ git-svn-id: https://source.openmpt.org/svn/openmpt/branches/OpenMPT-1.31@20689 56274372-70c3-4bfc-bfc3-4c3a0b034d27
Did I miss something? Doesn't this also break the recommended configuration for public repositories, as the Git repository is never cloned when using the configuration? UPDATE: Looks like the recommended setup as documented isn't affected because there is a special case when the Lines 83 to 93 in c40d89d
However, with Artifacts v4, we can no-longer use the |
I'm not sure why but I'm getting this error.
My build script is a bit long so copying and pasting it all of here seems uneeded.
The text was updated successfully, but these errors were encountered: