-
Notifications
You must be signed in to change notification settings - Fork 24
converted actionlint github workflow test to rust test #560
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
Conversation
test-fuzz/tests/integration/ci.rs
Outdated
]) | ||
.logged_assert() | ||
.success(); | ||
let home = home::home_dir().unwrap(); |
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.
std::env::home_dir
will be undeprecated in Rust 1.87, which will be released in a couple of weeks: rust-lang/rust#140133
Could we please use that with #[allow(deprecated)]
?
Also, I would prefer to continue to install actionlint
from ci.yml. Could you please move the command to do that to just after this line?
test-fuzz/.github/workflows/ci.yml
Line 169 in d448ab4
cargo install group-runner || true |
It looks like actionlint
is warning following your changes. I will look into the warnings separately.
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.
Thank you @smoelius for the feedback — I just need a bit of clarification.
I would prefer to continue to install
actionlint
from ci.yml. Could you please move the command to do that to just after this line?
The Rust actionlint
test I wrote currently does two things:
- Installs the
actionlint
tool - Runs the installed
actionlint
binary to confirm it works
From your comment, I understand you'd prefer to keep the installation in ci.yml
. Does that mean I should remove the installation step from the Rust function and leave only the part that runs the binary?
Also, since the ci.yml
file still contains the actionlint
test (I haven’t removed it yet), if we're keeping the installation there, should I move that step down to line 170 as you suggested?
Apologies if these are overly basic questions — I just want to make sure I’m fully aligned before making changes. Thanks again for your helpful feedback!
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.
Apologies if these are overly basic questions
Not basic questions. Sorry for being unclear.
From your comment, I understand you'd prefer to keep the installation in
ci.yml
. Does that mean I should remove the installation step from the Rust function and leave only the part that runs the binary?
Yes, please.
Also, since the
ci.yml
file still contains theactionlint
test (I haven’t removed it yet), if we're keeping the installation there, should I move that step down to line 170 as you suggested?
Yes, please.
I would prefer that the test not install a binary into the user's home directory. So, for now, I think it is fine to require the user to already have actionlint
installed.
Moving the installation is required because actionlint
will now be run from the test
job (via ci.rs) rather than the lint
job.
Thank you @smoelius for the response. I have applied the changes you requested. Looks like the CI is still failing. I have checked the logs, and it looks like the CI is suggesting these changes
for this one, I was thinking about grouping Current: - name: Log github refs
run: |
echo '```' >> "$GITHUB_STEP_SUMMARY"
echo 'github.ref: ${{ github.ref }}' >> "$GITHUB_STEP_SUMMARY"
echo 'github.sha: ${{ github.sha }}' >> "$GITHUB_STEP_SUMMARY"
echo '```' >> "$GITHUB_STEP_SUMMARY" Proposed: - name: Log github refs
run: |
{
echo '```'
echo 'github.ref: ${{ github.ref }}'
echo 'github.sha: ${{ github.sha }}'
echo '```'
} >> "$GITHUB_STEP_SUMMARY"
and for this one, simplifying Current: cat "$TMP" |
tee /dev/stderr |
tail -n 1 |
grep '^.*: crate [^`]* already exists on crates.io index$' Proposed: tee /dev/stderr < "$TMP" |
tail -n 1 |
grep '^.*: crate [^`]* already exists on crates.io index$' These changes will have the following improvements:
Can you please check if the changes I mentioned are valid or not? Thank You! |
.github/workflows/ci.yml
Outdated
|
||
- name: Install actionlint | ||
run: go install github.com/rhysd/actionlint/cmd/actionlint@latest |
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.
- name: Install actionlint | |
run: go install github.com/rhysd/actionlint/cmd/actionlint@latest | |
go install github.com/rhysd/actionlint/cmd/actionlint@latest |
Sorry, I was unclear. You can put the go install ...
after the last cargo install ...
in the "Install tools" step.
Please also don't forget to use std::env::home_dir
instead of home::home_dir
(and remove home
).
@markv44 Thanks very much for your analysis of the |
I just pushed a change that made the "Log github refs" code go away. For this one:
I actually prefer the I've not tried this before, but could you please try running |
@smoelius I've added In the CI failure logs, the error about grouping |
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.
I think we're just about there. But let's please check that CI passes after making these changes.
test-fuzz/tests/integration/ci.rs
Outdated
@@ -232,7 +232,16 @@ fn unmaintained() { | |||
.success(); | |||
} | |||
|
|||
#[allow(deprecated)] |
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.
#[allow(deprecated)] |
Hi @smoelius, thank you for your feedback. I've applied the changes and the But there's one new error about
I am not sure what this error is about. Can you give some suggestions? Thank you! |
The error is saying that the Recall that I requested you use |
@smoelius thank you for the help. The CI tests passed |
Cargo.toml
Outdated
@@ -34,6 +34,7 @@ mio = { version = "1.0", features = ["os-ext", "os-poll"] } | |||
num_cpus = "1.16" | |||
num-traits = "0.2" | |||
option_set = "0.3" | |||
home = "0.5" |
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.
home = "0.5" |
Oof. It's unfortunate that cargo-udeps
doesn't flag workspace dependencies. Could you please remove this too?
After that, could you please squash your commits down to one?
8e23e85
to
569ac11
Compare
@smoelius I think everything is done! |
Sorry, I should have said "rebase onto master and squash your commits down to one". Right now, it looks like 569ac11 includes changes that are already in master. Could you please try this? git checkout actionlint-ci-test
git pull https://github.com/trailofbits/test-fuzz master --rebase
git push --force Ultimately, I am going to rebase your changes when I merge, but it is nice to seem them beforehand for sanity. |
5bb0a64
to
3ba6e77
Compare
Thanks for clarification @smoelius. I believe it is done correctly this time. |
Thanks, @markv44! If you wanted to submit a follow-up PR to remove the Actionlint step from ci.yml, I would appreciate it. No obligation, though. |
This pr partially fixes #413
Converted actionlint workflow test to rust test