GitHub Actions runner failed with deprecation error:
Error: This request has been automatically failed because it uses a deprecated version of `actions/upload-artifact: v3`.
Learn more: https://github.blog/changelog/2024-04-16-deprecation-notice-v3-of-the-artifact-actions/
The workflow was using deprecated versions of several GitHub Actions:
actions/upload-artifact@v3→ deprecated since April 16, 2024actions/setup-python@v4→ newer version availableactions/cache@v3→ newer version availablecodecov/codecov-action@v3→ newer version available
Changed locations:
- Upload HTML coverage report
- Upload test results (with matrix strategy)
- Upload benchmark results
Before:
- name: Upload HTML coverage report
uses: actions/upload-artifact@v3After:
- name: Upload HTML coverage report
uses: actions/upload-artifact@v4Changed in all jobs:
- Main test job (matrix strategy)
- Advanced tests job
- Lint job
Before:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4After:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5Changed in:
- Main test job pip dependencies caching
Before:
- name: Cache pip dependencies
uses: actions/cache@v3After:
- name: Cache pip dependencies
uses: actions/cache@v4Changed in:
- Coverage report upload
Before:
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3After:
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4- ✅
actions/checkout@v4(already up-to-date) - ✅
actions/setup-python@v5(updated from v4) - ✅
actions/cache@v4(updated from v3) - ✅
actions/upload-artifact@v4(updated from v3) - ✅
codecov/codecov-action@v4(updated from v3)
- Compatibility: Resolves deprecation warnings and errors
- Performance: Latest versions include performance improvements
- Security: Latest versions include security patches
- Features: Access to newest features and bug fixes
- Future-proofing: Ensures workflow continues to work
The updated workflow maintains all existing functionality:
- ✅ Multi-stage testing (basic → advanced → lint)
- ✅ Matrix strategy for Python 3.11 and 3.12
- ✅ Coverage reporting with Codecov integration
- ✅ Artifact uploads for test results and coverage
- ✅ Dependency caching for performance
- ✅ Conditional execution for advanced tests (main branch only)
🟢 RESOLVED: All deprecated actions updated to latest versions
The GitHub Actions workflow is now fully compatible with current GitHub Actions infrastructure and will not encounter deprecation-related failures.
- Monitor workflow execution to ensure all updates work correctly
- The workflow will now run successfully without deprecation warnings
- All existing functionality is preserved with improved performance and security