Skip to content
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

Make sure working directory is respected when configured from matrix #1686

Merged

Conversation

krisgeus
Copy link
Contributor

fixes #1685

@krisgeus krisgeus requested a review from a team as a code owner March 17, 2023 14:13
@mergify
Copy link
Contributor

mergify bot commented Mar 17, 2023

@krisgeus this pull request has failed checks 🛠

@mergify mergify bot added the needs-work Extra attention is needed label Mar 17, 2023
@krisgeus
Copy link
Contributor Author

@act-maintainers. The checks are failing but to mee it seem to be unrelated to my specific change. Unfortunately I wasn’t able to get the tests to run locally to verify.
Could you shed some light on this to help me figure out what I need to do to fix this?

@ChristopherHX
Copy link
Contributor

Seems like this change cause regressions, maybe you skipped over some function reading workdir

Unfortunately I wasn’t able to get the tests to run locally to verify.

One error can be reproduced like, switching to act master fixes it

go build
./act -W ./pkg/runner/testdata/nix-prepend-path/push.yml -P self-hosted=-self-hosted

@krisgeus
Copy link
Contributor Author

@ChristopherHX I see there is some kind of regression indeed. The test fails in my branch and not in master. I cannot figure out why and need help with that. I removed the unwanted side effect of setting the WorkingDirectory on the step (unwanted in the case of using a matrix) but it seems that this side effect is needed in regular cases.
I have searched the full codebase to see where WorkingDirectory is used and cannot find any other occurrences then the ones I touched already.
If you could help me out with this investigation it is much appreciated.

@codecov
Copy link

codecov bot commented Mar 23, 2023

Codecov Report

Merging #1686 (3d7b363) into master (4989f44) will increase coverage by 1.60%.
The diff coverage is 74.52%.

@@            Coverage Diff             @@
##           master    #1686      +/-   ##
==========================================
+ Coverage   61.22%   62.83%   +1.60%     
==========================================
  Files          46       48       +2     
  Lines        7141     7482     +341     
==========================================
+ Hits         4372     4701     +329     
+ Misses       2462     2461       -1     
- Partials      307      320      +13     
Impacted Files Coverage Δ
pkg/container/docker_cli.go 82.23% <ø> (ø)
pkg/container/docker_logger.go 52.08% <ø> (ø)
pkg/container/docker_pull.go 33.33% <ø> (ø)
pkg/container/docker_run.go 14.08% <0.00%> (+0.49%) ⬆️
pkg/container/docker_volume.go 0.00% <ø> (ø)
pkg/container/file_collector.go 37.30% <0.00%> (ø)
pkg/container/host_environment.go 0.00% <0.00%> (ø)
pkg/exprparser/functions.go 66.32% <0.00%> (-1.04%) ⬇️
pkg/model/workflow.go 42.11% <ø> (ø)
pkg/model/planner.go 44.71% <21.27%> (-4.12%) ⬇️
... and 20 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@mergify mergify bot removed the needs-work Extra attention is needed label Mar 23, 2023
@mergify mergify bot requested a review from a team March 23, 2023 11:02
Copy link
Contributor

@ChristopherHX ChristopherHX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thank you for contributing a fix.

@krisgeus
Copy link
Contributor Author

Happy to be able to contribute. I updated the branch to match the latest master. Let me know if I need to do anything else to get this one merged.

Copy link
Member

@KnisterPeter KnisterPeter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work. Thanks for your contribution 😃

@mergify mergify bot merged commit 75ffa20 into nektos:master Mar 28, 2023
@krisgeus krisgeus deleted the kg/get-correct-workingdirectory-from-matrix branch March 28, 2023 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

working-directory is not respected when coming from matrix
3 participants