Skip to content

fix(ci): resolve GitHub Actions workflow errors and dependencies #99

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 30, 2025

Conversation

sidmohan0
Copy link
Contributor

Summary

Comprehensive fix for GitHub Actions workflow failures in beta-release.yml and nightly-release.yml, resolving both YAML syntax errors and dependency issues.

Problems Resolved

1. YAML Syntax Errors ✅

  • Issue: Multi-line Python code blocks in bash commands broke YAML parsing
  • Fix: Converted problematic multi-line Python scripts to single-line commands
  • Files: .github/workflows/beta-release.yml, .github/workflows/nightly-release.yml

2. Missing Dependencies ✅

  • Issue: ModuleNotFoundError for typer, aiohttp, PIL, pydantic_settings causing test collection failures
  • Fix: Updated workflows to install [all,dev] extras instead of just [dev]
  • Additional: Moved pydantic-settings to core dependencies (required by datafog.config)

3. Pytest Configuration ✅

  • Issue: pytest-asyncio deprecation warnings about unset fixture loop scope
  • Fix: Added asyncio_default_fixture_loop_scope = function to tox.ini

4. Environment Cleanup ✅

  • Added: gliner_research_env/ to .gitignore

Technical Details

Before (YAML Syntax Error)

BASE_VERSION=$(python3 -c "
version = '$CURRENT_VERSION'  
parts = version.split('.')
parts[1] = str(int(parts[1]) + 1)
parts[2] = '0'
print('.'.join(parts))
")

After (Valid YAML)

BASE_VERSION=$(python3 -c "import sys; version='$CURRENT_VERSION'; parts=version.split('.'); parts[1]=str(int(parts[1])+1); parts[2]='0'; print('.'.join(parts))")

Dependency Installation Fix

# Before: Only lightweight core + dev dependencies
pip install -e ".[dev]"

# After: Full functionality + dev dependencies  
pip install -e ".[all,dev]"

Validation Results

  • ✅ YAML syntax validation passes locally and in CI
  • ✅ Dependency installation steps complete successfully
  • ✅ Workflows progress through all setup phases without infrastructure errors
  • ✅ No more "workflow file issue" errors in GitHub Actions
  • ✅ Error count reduced from 9 import errors to 0 import errors

Test Plan

  • Local YAML syntax validation with Python yaml.safe_load()
  • Manual workflow dispatch with dry_run=true
  • Verified all dependency installation steps pass
  • Confirmed workflow reaches test execution phase
  • Pre-commit hooks pass on all changes

The workflows now fail at legitimate test execution issues rather than infrastructure problems, indicating successful resolution of all GitHub Actions workflow errors.

🤖 Generated with Claude Code

sidmohan0 and others added 4 commits May 29, 2025 18:11
- Updated beta-release.yml and nightly-release.yml to install [all,dev] extras
- Fixed missing dependencies: typer, aiohttp, PIL, pydantic_settings
- Added asyncio_default_fixture_loop_scope = function to tox.ini pytest config
- Resolves ModuleNotFoundError issues and asyncio deprecation warnings in CI

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Added pydantic-settings>=2.0.0 to cli extra dependencies
- Included in all extras bundle for complete test coverage
- Resolves ModuleNotFoundError for pydantic_settings in CLI tests
- Required for datafog.config BaseSettings functionality

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Moved pydantic-settings from cli extra to core dependencies
- Required for datafog.config module which is imported by core components
- Resolves persistent ModuleNotFoundError in CI workflows
- Aligns with requirements.txt which already includes pydantic-settings

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@sidmohan0 sidmohan0 merged commit e6776db into dev May 30, 2025
19 checks passed
@sidmohan0 sidmohan0 deleted the fix/github-actions-workflow-fixes branch May 31, 2025 01:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant