-
Notifications
You must be signed in to change notification settings - Fork 333
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
Use the checkout_path
for getting the commit oid
#956
Conversation
d4d4a0a
to
471d7af
Compare
Still trying to figure out how to verify that the integration test is passing (other than by visually inspecting the log). We need to validate that the commitOid of the payload that would have been invoked is the same as that of the second checkout. One possibility is that I can change the |
b8a2c1e
to
9acab1b
Compare
9acab1b
to
d7473a8
Compare
This commit also adds a new integration check to verify this. When running in test mode, payloads will not be uploaded. Instead, they will be saved to disk so that they can be inspected later.
d7473a8
to
a92e877
Compare
72d4e07
to
98e84df
Compare
source-path: x/y/z/some-path/tests/multi-language-repo | ||
debug: true | ||
- name: Build code (non-windows) | ||
shell: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this intentional? Similarly for Build code (windows)
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm...it should be bash
. Here and below.
debug: true | ||
- name: Build code (non-windows) | ||
shell: | ||
if: ${{ !startsWith(matrix.os, 'windows-') }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An alternative is to check runner.os
.
https://docs.github.com/en/actions/learn-github-actions/contexts#runner-context
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. That's true. It's cleaner to use runner.os. I'll make the change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your review!
source-path: x/y/z/some-path/tests/multi-language-repo | ||
debug: true | ||
- name: Build code (non-windows) | ||
shell: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm...it should be bash
. Here and below.
debug: true | ||
- name: Build code (non-windows) | ||
shell: | ||
if: ${{ !startsWith(matrix.os, 'windows-') }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. That's true. It's cleaner to use runner.os. I'll make the change.
98e84df
to
6591114
Compare
a4e7f9e
to
852be69
Compare
Fixes #944 |
852be69
to
5d444c1
Compare
5d444c1
to
88db5e7
Compare
@criemen I fixed the hang we were seeing by changing from java to csharp for |
Merging this PR since the previously hanging integration tests are unrelated. |
Ensure that repos checked out in a non-standard location can still be uploaded.
Here is a sample PR in a different repo that uses the
checkout_path
: https://github.com/aeisenberg/actions-test2/pull/4/checksI created an integration test that validates that
checkout_path
is doing what it should. Looking at the logs, I can see that the test is doing the right thing, but I'm not able to get the test to fail whencheckout_path
is not set. So, this still needs a bit of work. Ideally, we would upload the sarif file and verify that the commit_oid is correct, but our tests cannot actually upload any sarif, so that makes checking a little bit harder.EDIT: I think I have it. See the new integration test.
When running in test mode, payloads will not be uploaded. Instead, they
will be saved to disk so that they can be inspected later.
This change will also require a documentation fix.
I'm not entirely happy with this since to get this working, the init action requires a
source-path
input and the analyze action requires acheckout_path
. But we can specify this in the doc changes.Fixes #952
Merge / deployment checklist