Add tests to ensure workflow doesn't get broken
- [ ] 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:
-
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
-
Local workflow testing using the
acttool- Simulated workflow executions with different token types
- Verification of token validation in workflow files
-
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]
I'll soon deal with it when I have time.
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?
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.
will deal with it
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.
.
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.
@erkinalp just want to clarify if this is ready for review or you still have to address neubig's comments?
not yet
closing OOD