OpenHands icon indicating copy to clipboard operation
OpenHands copied to clipboard

Add tests to ensure workflow doesn't get broken

Open erkinalp opened this issue 9 months ago • 6 comments

  • [ ] This change is worth documenting at https://docs.all-hands.dev/
  • [ ] Include this change in the Release Notes. If checked, you must provide an end-user friendly description for your change below

End-user friendly description of the problem this fixes or functionality that this introduces. Added comprehensive test suite for workflow token authentication to ensure that token handling in GitHub and GitLab workflows remains functional and secure.


Give a summary of what the PR does, explaining any non-trivial design decisions. This PR implements tests for workflow token authentication as requested in issue #7573. It includes:

  1. Unit tests for token handling in GitHub workflows

    • Tests for GitHub token validation
    • Tests for GitHub PAT token handling
    • Tests for GitLab token authentication
    • Tests for missing token scenarios
  2. Local workflow testing using the act tool

    • Simulated workflow executions with different token types
    • Verification of token validation in workflow files
  3. Integration tests for token authentication

    • End-to-end testing of token handling in workflows
    • Tests for token permissions and security constraints

The tests use mocking to avoid requiring actual API calls while still providing comprehensive coverage of token handling functionality.


Link of any specific issues this addresses. Fixes #7573

Link to Devin run: https://app.devin.ai/sessions/9e4698444aa147bf8d970a4faec2de3e

Co-authored-by: Erkin Alp Güney [email protected]

erkinalp avatar Apr 01 '25 18:04 erkinalp

I'll soon deal with it when I have time.

erkinalp avatar Apr 08 '25 04:04 erkinalp

FYI: (because it's lacking --selected_repo arg,) send_pull_request.py fails in the current openhands-resolver.yml if you use github_token generated from the workflow. Does this PR catch it?

tawago avatar Apr 09 '25 16:04 tawago

This PR is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] avatar May 10 '25 02:05 github-actions[bot]

will deal with it

erkinalp avatar May 10 '25 05:05 erkinalp

This PR is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] avatar Jun 10 '25 02:06 github-actions[bot]

.

erkinalp avatar Jun 10 '25 10:06 erkinalp

This PR is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] avatar Jul 11 '25 02:07 github-actions[bot]

@erkinalp just want to clarify if this is ready for review or you still have to address neubig's comments?

mamoodi avatar Jul 18 '25 14:07 mamoodi

not yet

erkinalp avatar Jul 18 '25 18:07 erkinalp

closing OOD

erkinalp avatar Jul 31 '25 13:07 erkinalp