[ ] 👎 Sweep Needs Improvement
I created this PR to fix the failing GitHub Actions.## Description
This PR addresses the issues causing GitHub Actions (GHA) to fail. The changes focus on handling environment-specific conditions in GHA and improving error handling and messaging for CI environments.
Summary of Changes
Modified cli.py to skip Git configuration checks when running in GHA. This prevents failures due to missing Git user configurations in the GHA environment.
Improved error handling in cli.py for GitHub access token validation. When running in GHA, the error messages now suggest checking the repository's secrets configuration if token validation fails.
Created a new test utility gha_test_utils.py with a function skip_unless_in_ci to skip certain tests unless they are running in a CI environment. This ensures that CI-specific tests are not inadvertently skipped.
Modified the skip_in_ci function in autogpts/autogpt/tests/utils.py to correctly identify GHA and other CI environments. This ensures that tests unsuitable for CI are correctly skipped.
These changes should resolve the issues causing GHA to fail and improve the robustness of the CI setup.
PR Feedback (click)
Summary of Changes
cli.py
to skip Git configuration checks when running in GHA. This prevents failures due to missing Git user configurations in the GHA environment.cli.py
for GitHub access token validation. When running in GHA, the error messages now suggest checking the repository's secrets configuration if token validation fails.gha_test_utils.py
with a functionskip_unless_in_ci
to skip certain tests unless they are running in a CI environment. This ensures that CI-specific tests are not inadvertently skipped.skip_in_ci
function inautogpts/autogpt/tests/utils.py
to correctly identify GHA and other CI environments. This ensures that tests unsuitable for CI are correctly skipped.These changes should resolve the issues causing GHA to fail and improve the robustness of the CI setup.