Skip to content

ER: How to Test GitHub Actions Documentation - nektos/act Emulation #8706

Open

Description

@egcuriel

Emergent Requirement - Problem

Currently, developers rely heavily on trial-and-error by pushing commits to GitHub to see if workflow orchestration succeeds, or they struggle with permission errors when trying to test workflows on their personal forks. While standard CLI tools (gh api) are great for testing simple logic, nektos/act is required for simulating full event payloads and YAML orchestration locally via Docker. Creating this document will standardize the local testing environment for power-users, prevent credential leaks, and significantly speed up the development cycle for automation features.

Issue you discovered this emergent requirement in

#8584

Date discovered

06/23/2026

Did you have to do something temporarily

  • YES
  • NO

Who was involved

I've discussed with @daras-cu and she agreed it would be helpful.

Potential Solution:

I can create an additional document to supplement the existing 'How to Test GitHub Actions' series that is available in the Google Drive, to provide a testing track for developers who need to test or modify complex, event-driven GitHub Actions workflows (such as move-closed-issues) locally before pushing changes or reviewing pull requests.

(Note: I just went through this exact setup process successfully to test PR #8696 and would like to take the lead on writing this guide!)

Details

The guide will provide a step-by-step walkthrough for configuring act locally, specifically addressing the unique hurdles of our repository. It will be broken down into universal testing steps and OS-specific setup:

Universal Emulation Steps (Mac, Windows, Linux):

  • Mocking GitHub Context: Explaining why event-driven workflows crash locally without payload data, and providing the exact curl/jq commands to fetch live issue data and format it into an event.json payload.
  • Secure Authentication & Context Spoofing:
    • Setting up a .secrets file with a Personal Access Token (PAT) for GraphQL API queries.
    • Overriding the GITHUB_REPOSITORY environment variable during execution so act queries the main hackforla/website repository instead of a personal fork.
  • Git Remote Configuration: (Optional but recommended) Ensuring developers have their Git remotes configured for SSH to streamline the testing and pushing pipeline.

Linux/WSL Specific Setup:

  • Installation & Compilation Hurdles: How to bypass outdated apt packages to install modern Go (1.21+) and compile act from source (this serves as a crucial troubleshooting fallback for developers when standard package managers fail).

Resources

Hack for LA Google Drive:
\HackforLA.org website\HackforLA.org website folder\3 - Developers\GitHub Actions (GHA)\1. How to test GitHub Actions.gdoc
1. How to Test GitHub Actions - using nektos/act

\HackforLA.org website\HackforLA.org website folder\3 - Developers\GitHub Actions (GHA)\2. Additional Notes for GitHub Actions.docx
2. Additional Notes for GitHub Actions

External Resources:
nektos/act Official Repository
GitHub API: Fetching an Issue
jq Manual (for JSON parsing)

Activity

  1. added
    enhancementNew feature or request suggestion
    Feature MissingThis label means that the issue needs to be linked to a precise feature label.
    role missingA specific role label needs to be applied to the issue
    on Jun 30, 2026
  2. github-actions commented on Jun 30, 2026

    @github-actions
  3. changed the title [-]Guide Request: 3. How to Test GitHub Actions - nektos/act Emulation[/-] [+]ER: How to Test GitHub Actions Documentation - nektos/act Emulation[/+] on Jul 1, 2026
  4. added
    EREmergent Request
    and removed
    enhancementNew feature or request suggestion
    on Jul 1, 2026
  5. 1 remaining item

  6. added
    Complexity: See issue making labelSee the Issue Making label to understand the issue writing difficulty level
    size: 0.5ptCan be done in 3 hours or less
    and removed
    role missingA specific role label needs to be applied to the issue
    on Jul 11, 2026
  7. added this to the 08. Team workflow milestone on Jul 11, 2026
  8. daras-cu commented on Jul 11, 2026

    @daras-cu
    Member

    @egcuriel thanks for writing this ER, everything looks good. Since you'd like to work on the guide as well, I'll go ahead and assign you to this ER to write the issue. You can use the "Blank issue form with no dependency" template. The potential solution you wrote out looks good. Since this issue will not need a PR, the final action item can be to add the "ready for dev lead" label and move the issue to the Questions/In Review column on the project board. I think the issue complexity will be large, and you can estimate how long it will take you to write and pick the appropriate size.

  9. moved this from New Issue Approval to ERs and epics that are ready to be turned into issues in P: HfLA Website: Project Boardon Jul 11, 2026
  10. moved this from ERs and epics that are ready to be turned into issues to In progress (actively working) in P: HfLA Website: Project Boardon Jul 11, 2026
  11. HackforLABot commented on Jul 11, 2026

    @HackforLABot
    Contributor

    Hi @egcuriel, thank you for taking up this issue! Hfla appreciates you :)

    Do let fellow developers know about your:-
    i. Availability: (When are you available to work on the issue/answer questions other programmers might have about your issue?)
    ii. ETA: (When do you expect this issue to be completed?)

    You're awesome!

    P.S. - You may not take up another issue until this issue gets merged (or closed). Thanks again :)

  12. egcuriel commented on Jul 21, 2026

    @egcuriel
    MemberAuthor

    Availability: T-S (7 pm - 11 pm)
    ETA: 08/11/2026

  13. egcuriel commented on Sep 29, 2026

    @egcuriel
    MemberAuthor

    Progress: I'm reconsidering how relevant this will be and how it fits our current testing arrangement. I will check back again after going through more PRs that necessitate testing GHAs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions