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

feat(asyn/await): parallelize commands #852

Merged
merged 3 commits into from
Nov 2, 2024
Merged

feat(asyn/await): parallelize commands #852

merged 3 commits into from
Nov 2, 2024

Conversation

aorinevo
Copy link
Collaborator

@aorinevo aorinevo commented Oct 6, 2024

This pull request focuses on enhancing the end-to-end (e2e) tests for the CLI, improving the migration process, and refactoring the code for better readability and maintainability. The most important changes include adding new test cases, modifying existing snapshots, and refactoring the apply command to improve error handling and logging.

Enhancements to e2e Tests:

  • Added a new afterAll hook to clean up test migration directories after tests run in e2e/cli.test.ts.
  • Updated test cases to handle migrations targeting single and multiple repositories, and modified snapshots accordingly in e2e/cli.test.ts and e2e/__snapshots__/cli.test.ts.snap. [1] [2]

Migration Process Improvements:

  • Refactored the apply command to modularize the code, improve error handling, and enhance logging. This includes creating helper functions like resetRepo, resetBranch, and handleApplySteps in src/commands/apply.ts.

Codebase Refactoring:

  • Refactored checkout command tests to improve readability and maintainability by using beforeEach for setup and adding new test cases for different scenarios in src/commands/checkout.test.ts. [1] [2] [3]

Minor Changes:

  • Updated the migration configuration file examples/eslintrc-yml/shepherd.yml to reflect a new test migration.
  • Temporarily disabled a failing test case in src/commands/apply.test.ts to focus on other improvements.

Screenshots

e2e Tests

Screenshot 2024-10-27 at 2 12 43 PM

Manual Test

Checkout
Screenshot 2024-10-27 at 2 13 59 PM

Apply
Screenshot 2024-10-27 at 2 14 17 PM

@aorinevo aorinevo self-assigned this Oct 6, 2024
@aorinevo aorinevo marked this pull request as draft October 6, 2024 23:52
@aorinevo aorinevo mentioned this pull request Oct 7, 2024
@aorinevo aorinevo changed the base branch from main to v3 October 27, 2024 16:08
@aorinevo aorinevo added the v3 label Oct 27, 2024
@aorinevo aorinevo marked this pull request as ready for review October 27, 2024 16:08
@aorinevo aorinevo force-pushed the parallelize branch 5 times, most recently from 3abe5a3 to 2817681 Compare October 27, 2024 18:02
@aorinevo aorinevo merged commit 930c65c into v3 Nov 2, 2024
5 checks passed
@aorinevo aorinevo deleted the parallelize branch November 2, 2024 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant