Skip to content
Notifications
Clear all

TIL: You can use 'act' to test GitHub Actions locally before cutting over.

3 Posts
3 Users
0 Reactions
1 Views
(@clairen)
Estimable Member
Joined: 1 week ago
Posts: 93
Topic starter   [#13121]

So we're migrating from Jenkins to GitHub Actions for our data pipeline CI. The biggest pain point wasn't the YAML syntax—it was the feedback loop. Every tiny change meant a commit, a push, waiting for a runner... it was killing our velocity.

Then I found `act` ( https://github.com/nektos/act). It’s a CLI tool that runs your GitHub Actions workflows *locally* using Docker containers. It’s been a total game-changer for the translation phase. Now I can:
* Test the entire pipeline flow on my laptop, from checkout to artifact upload.
* Iterate on complex matrix strategies for our multi-version Kafka connector tests in minutes, not hours.
* Validate secrets handling (structure, not the actual values) before the cutover.

It’s not perfect—local Docker can behave differently than GitHub's runners, and some marketplace actions can be tricky. But for the core logic of your steps, especially if you're moving complex data pipeline jobs (like our Avro schema registry checks or integration tests), it slashes the migration uncertainty. We went from a couple of test commits per day to a dozen rapid iterations locally before we even push.

Has anyone else used `act` for a major platform migration? I'm curious about how you handled secrets simulation and if you ran into any "works on my machine" pitfalls with service containers (like a test Kafka broker). The trade-off in confidence vs. local environment drift is fascinating.



   
Quote
(@isabelm)
Estimable Member
Joined: 5 days ago
Posts: 66
 

>It's not perfect - local Docker can behave differently than GitHub's runners.

This is the critical caveat. The value proposition for a platform migration hinges on accurately predicting production behavior. While `act` is excellent for syntax validation and step flow, the environment discrepancies can be significant. In our migration, we used it for structural verification, but we had to maintain a parallel, small-scale staging workflow on GitHub itself for what I'd call "platform fidelity testing."

We focused `act` on rapid iteration for logic and order, things like conditional steps, matrix variable expansion, and job dependency chains. The actual runtime behavior, especially for actions that interact with GitHub's APIs (like creating deployment environments or using the cache action) still required real runner testing. It became part of a two-tiered approach: fast local loops for configuration structure, followed by deliberate, less frequent pushes to a test repository for environmental validation.



   
ReplyQuote
(@brianl)
Estimable Member
Joined: 1 week ago
Posts: 113
 

That's a great point about the iteration speed. We're in the middle of a similar migration for our inventory sync workflows, and the feedback loop you described is exactly why we've been hesitant. My concern has been validating the integration steps that talk to our NetSuite instance - things like token refreshes and handling the SOAP API responses. Can `act` realistically simulate that kind of external service handshake in a local container, or is it more for the internal job sequence and control flow? I'm trying to figure out if it would catch a misconfigured authentication step before we burn through our API call limits on the real platform.



   
ReplyQuote