Skip to content
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

chore: Enhance IRL test suites and update IRL test workflow #56

Merged
merged 4 commits into from
Sep 28, 2024

Conversation

mitsuki31
Copy link
Owner

Overview

This pull request re-enables and enhances the IRL test suites for downloading YouTube videos and refines the IRL Test workflow to better accommodate the current testing environment.

Changes Made

Test Suite Enhancements

  • Re-enabled the 'Downloading and converting some YouTube videos to MP3 format' (old title) and 'Downloading using batch download' tests.
  • Improved logging to provide clearer insights during test execution.
  • Streamlined test structure for better readability and maintainability.
  • Adjusted timeouts and assertions to ensure consistent test behavior.
  • Added a note that these tests should not run in cloud CI due to YouTube's updated algorithm requiring specific bypass techniques.

IRL Test Workflow Updates

  • Modified the cron schedule to trigger twice daily at 06:00 and 18:00.
  • Improved job naming for clarity in CI logs.
  • Specified FFmpeg version (7.0.2) to ensure consistency in the testing environment.
  • Updated comments to highlight limitations related to downloading videos in CI environments and clarified the focus of the tests.
  • Adjusted the test command to run only conversion tests, given the current restrictions on downloading.

Impact

These changes aim to enhance the functionality and reliability of the IRL tests while ensuring that the CI workflow is optimized for the environment. The focus on conversion tests will provide meaningful feedback without running afoul of YouTube's restrictions on automated downloads.

- Re-enabled 'Downloading and converting some YouTube videos to MP3 format' and 'Downloading using batch download' tests.
- Improved logging for better clarity during test execution.
- Streamlined test structure for readability and maintainability.
- Adjusted timeouts and assertions to ensure consistent behavior.

Note:
These tests are not intended to run in cloud CI (e.g., GitHub Actions) due to YouTube's updated algorithm that restricts bot automation for downloading their videos.
Bypassing these restrictions would require specific algorithms within the codebase, such as using proxies.
- Adjusted cron schedule to run daily at 06:00 and 18:00 (twice a day) instead four times a day.
- Enhanced job naming for better clarity in CI logs.
- Set specific FFmpeg version (7.0.2) for consistent test environment.
- Updated comments to clarify the nature of the tests and the impact of YouTube's restrictions on cloud CI.
- Modified the test command to focus on conversion tests only due to current limitations on downloading videos in CI environments.
@mitsuki31 mitsuki31 added chore Maintenance updates to improve project maintainability patch Patch changes labels Sep 28, 2024
@mitsuki31 mitsuki31 self-assigned this Sep 28, 2024
- Added a new script named `coverage:no-dltest` to execute unit tests and filter IRL tests to include only conversion-related tests.
- This script allows for targeted testing while maintaining accurate coverage reports.
- Modified the coverage workflow to run `npm run coverage:no-dltest` instead of the standard coverage command.
- This change ensures that coverage reports focus on tests unaffected by YouTube's download restrictions in CI environments.
@mitsuki31 mitsuki31 merged commit eb32659 into master Sep 28, 2024
18 checks passed
@mitsuki31 mitsuki31 deleted the chore/enable-youtube-download-tests branch September 28, 2024 11:12
mitsuki31 added a commit that referenced this pull request Sep 28, 2024
This change is also fixes an error during coverage upload due to missing coverage reports. The missing coverage reports was due to the `coverage:no-dltest` was not call the nyc command to retrieve the coverage information.

Related changes: #56

Signed-off-by: Ryuu Mitsuki <dhefam31@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Maintenance updates to improve project maintainability patch Patch changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant