Live data from Hacker News

Act: Run your GitHub Actions locally

github.com

101–110 of 161 posts

Re: Act: Run your GitHub Actions locally

#101
This piece of software would have to handle all the intricacies of the GitHub actions but also be updated to the latest changes...

We are moving back to a makefile based approach that is called by the GitHub workflows. We can handle different levels of parallelism: the make kind or the indexed by worker number when running in actions. That way we can test things locally, we can still have 32 workers on GitHub to run the full suite fast enough.

I also like that we are less bound to GitHub now because it has been notorious unreliable for us this past year and we may move more easily to something else.

Re: Act: Run your GitHub Actions locally

#102

Earlier quoted context omitted.

It's ridiculous how we still tolerate the CI vendor lock-in.

name one (1) CI system, open or closed, which shares enough with another CI system, open or closed, that there is no pain when changing from one to another. they are all at least semi proprietary.

All I ask from a CI is to be able to run Docker and access build resources in a structured manner.

Concourse, Circle CI and gitlab do that.

Re: Act: Run your GitHub Actions locally

#103
post #101

This piece of software would have to handle all the intricacies of the GitHub actions but also be updated to the latest changes... We are moving back to a makefile based approach that is called by the GitHub workflows. We can handle different levels of parallelism: the make kind or the indexed by worker number when running in actions. That way we can test things locally, we can still have 32 workers on GitHub to run…

Is this public?

Re: Act: Run your GitHub Actions locally

#104
post #3
post #2

This is pretty cool but I have never managed to make it work with our AWS ECR repos. There are probably some permissions that I am missing but not very clear in the documentation how to do that.

Same. I've only got it to work with the most basic of actions. Anything that requires Docker didn't work for me the last time I tried it! There's a way to download a much larger "base image" which in theory would make it work, but if I remember rightly it was something like 60gb of containers which I was never patient enough to download. It was always quicker to just push up to github and iterate that way unfortunate…

Yeah, 60GB (“big”) and there is a “large” act’s Docker image whose size is 16GB: https://github.com/nektos/act/issues/107#issuecomment-760376...

Re: Act: Run your GitHub Actions locally

#105
post #101

This piece of software would have to handle all the intricacies of the GitHub actions but also be updated to the latest changes... We are moving back to a makefile based approach that is called by the GitHub workflows. We can handle different levels of parallelism: the make kind or the indexed by worker number when running in actions. That way we can test things locally, we can still have 32 workers on GitHub to run…

Yes! We use gradle as much as possible to accomplish the same thing. CI runs ‘gradle build’ and it’s easily migrated in future if need be.

Re: Act: Run your GitHub Actions locally

#106
post #101

This piece of software would have to handle all the intricacies of the GitHub actions but also be updated to the latest changes... We are moving back to a makefile based approach that is called by the GitHub workflows. We can handle different levels of parallelism: the make kind or the indexed by worker number when running in actions. That way we can test things locally, we can still have 32 workers on GitHub to run…

Is this public?

No, sorry about that.

Re: Act: Run your GitHub Actions locally

#107

Earlier quoted context omitted.

name one (1) CI system, open or closed, which shares enough with another CI system, open or closed, that there is no pain when changing from one to another. they are all at least semi proprietary.

All I ask from a CI is to be able to run Docker and access build resources in a structured manner. Concourse, Circle CI and gitlab do that.

so can GitHub Actions. And Jenkins, I guess.

And running your jobs in Docker is what I recommend that people at my work do, and I admin several GitHub Enterprise Server instances and GitHub Enterprise Cloud as well.

This is the one thing that Drone got very right - every Drone job runs in a container. It is built in to the drone tooling to be able to run those jobs locally on your development machine as well, and requiring containers is why that works.

If you run your CI and/or CD steps from within a container, you can run that container anywhere, and writing a small script to read your CI/CD yaml (or whatever you use), and wrap your favorite container command line tool into a working local CI/CD system should be pretty trivial.

Using containers also makes moving to another CI/CD system which can use containers as trivial as it can currently be.

Re: Act: Run your GitHub Actions locally

#109
post #31

Earlier quoted context omitted.

Generally speaking: have one syntax/pipeline that works on GitHub, Gitlab, etc I think the big problem would be the marketplace, you need to implement your own or make it compatible with the GitHub one

This is already entirely doable: just create some executable "test" program in $language_of_choice (shell script, Python, compiled C binary if you really want to) and run that in the CI. You're still going to have to need a wee bit of CI configuration (usually YAML) to tell it which containers to run and whatnot, but this usually isn't all that much.

Yep. CI systems offer some extra features. If you don't use them there isn't really a lock in.

From the top of my head:

1. Parallelization. 2. Capture of build artifacts, which can also be useful for logs of non-linear complex tests such as dependencies of e2e tests. 3. Secrets for release or artifact uploads to third party repos (e.g. docker repos) 4. Caching.

There may be more. Once you sprinkle these things left and right in your CI config, it becomes hard to move to another, even if the bulk of the actual tests you run are just "make test"

Re: Act: Run your GitHub Actions locally

#110
post #7

Earlier quoted context omitted.

yeah i also use other incredibly informative messages like: - oh oops - fix for real this time - will this actually work? - this probably won't fix it - a

Yeah, but with one word messages you can pass it on the command line without quotes: git commit . -m fix

i usually write my actions in the web editor, but i do use -m when committing from git itself pretty much every time
Post reply on HN