mirror of
https://github.com/nektos/act.git
synced 2026-04-26 01:15:51 +03:00
[GH-ISSUE #765] Issue: better contributing documentation for act #483
Labels
No labels
area/action
area/cli
area/docs
area/image
area/runner
area/workflow
backlog
confirmed/not-planned
kind/bug
kind/discussion
kind/external
kind/feature-request
kind/question
meta/duplicate
meta/invalid
meta/need-more-info
meta/resolved
meta/wontfix
meta/workaround
needs-work
pull-request
review/not-planned
size/M
size/XL
size/XXL
stale
stale-exempt
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/act#483
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ryuheechul on GitHub (Aug 6, 2021).
Original GitHub issue: https://github.com/nektos/act/issues/765
Originally assigned to: @catthehacker on GitHub.
System information
act: N/Aactversion: main branch,github.com/nektos/act@0ff204b615Expected behaviour
go test ./...run successfullyActual behaviour
Many test files fail including
github.com/nektos/act@0ff204b615/pkg/runner/step_context_test.goWorkflow and/or repository
N/A
Steps to reproduce
Either
make testorgo test ./...actoutputN/A
Description
It looks like many tests are broken? including
github.com/nektos/act@0ff204b615/pkg/runner/step_context_test.go (L1-L29)And indeed the file misses most of references.
just curious, if test files and testing is being ignored in the process of development?
Why raise this issue?
I tried to see if I could contribute to resolve this issue, https://github.com/nektos/act/issues/739
And I just cloned
actfor the first time and I find that not being able to run tests difficult to continue. Hence, became curious to see what's the stance of tests for this code/repository.@ChristopherHX commented on GitHub (Aug 6, 2021):
They are working for me in my ide.
All Tests are still required to succeed on linux and macOS, otherwise a PR will not be merged.
I'm using vscode + go tools, make shure you have go 1.16 and no older version.
I opened ./pkg/runner/step_context_test.go and pressed
debug test( a button over the test function added by the go tools for vscode).go test ./pkg/runner/step_context_test.gofails with the same error on my windows machine, I guess this is not the right way to run a test.I hate the macOS Test suite for this project, becauses it fails far to often due to docker hub rate limits
@catthehacker commented on GitHub (Aug 6, 2021):
Not sure what you mean,
go test ./...runs successfully and you provided example of running single test file which does not include required variable.github.com/nektos/act@0ff204b615/pkg/runner/runner_test.go (L19-L25)no, they are not
@catthehacker commented on GitHub (Aug 6, 2021):
You should be using arm64 version of Go
@ryuheechul commented on GitHub (Aug 6, 2021):
Thanks all for prompt responses!
I just figured out that
go test ./pkg/runner/step_context_test.gois a wrong usage of testing in Go.So I tried
go test ./pkg/runnerinstead. Now no more the same issue (undefined ...) but failing with some other issues.Since you all having no issues with running tests, something must have been wrong with my setup or I'm doing something wrong. I will try this later (maybe with an intel mac) and share my results.
Have a good weekend everyone :)
@catthehacker commented on GitHub (Aug 7, 2021):
well, it's not wrong usage in Go, just wrong in this project, depends if test depend on whole package or just file
@catthehacker commented on GitHub (Aug 7, 2021):
I guess the issue is solved so I'm going to close it. Ping me here or on Gitter if you still have issues.
Please direct your hate towards Apple/Docker for having shitty licencing :) (because of that,
dockercan't be included in GitHub Actions runners and therefore special API keys for bypassing rate limits are not included like inubunturunners)@ryuheechul commented on GitHub (Aug 7, 2021):
Thanks @catthehacker 👍🏼
I agree with closing the issue.
I can see that tests are running here fine, https://github.com/nektos/act/actions/runs/1094834668 (most recent tests)
(I should have found this one before opening the issue little too quickly!)
I understand macOS can be tricky to evaluate the build and test so I also tried with Github Codespace (Linux).
However,
make teststill failing on it and here are some pieces of error messeages from it.(ran it multiple times for both
masterbranch and most recent tag,0.2.24)It's probably related to docker issue and I'm not intending to reopen this issue.
Simply just wanted to share what I saw just now.
@catthehacker commented on GitHub (Aug 7, 2021):
@ryuheechul
That's my fault on not documenting it and/or isolating but we test running different architecture container (tests run with
linux/amd64+ one single test case runslinux/arm64[if ran on amd64, if ran on arm64, everything will run as arm64])You need to run
docker run --privileged --rm tonistiigi/binfmt --install allordocker run --privileged --rm tonistiigi/binfmt --install amd64,arm64and re-run tests@ryuheechul commented on GitHub (Aug 7, 2021):
@catthehacker Cool and thanks!
So I ran it on Github Codespace and all tests have passed 👍🏼
@ryuheechul commented on GitHub (Aug 7, 2021):
Anyone also didn't know what
binfmt[_misc]was (just like me), you can read about it in the link below and it's quite fascinating.https://medium.com/@tonistiigi/early-look-at-docker-containers-on-risc-v-40ed43b16b09
@catthehacker commented on GitHub (Aug 7, 2021):
I'm going to hijack this issue to improve docs.