Skip to content

Conversation

@damianpolak
Copy link
Owner

This pull request introduces a continuous integration (CI) workflow, adds unit tests for the configuration and feature modules, and enhances test coverage for key functionalities. Below are the most important changes grouped by theme:

CI Workflow Setup:

  • Added a GitHub Actions workflow (.github/workflows/main.yml) to run tests and build the project on pushes and pull requests targeting the main or master branches. The workflow supports Node.js versions 20.x, 22.x, and 24.x, and includes steps for dependency installation, testing, building, and uploading build artifacts.

Unit Tests for Configuration:

  • Added tests in test/config.test.ts to validate the creation of configuration objects with default values, provided CLI arguments, and partially undefined CLI arguments. Mocked the CLI module (cliArgsParse) to simulate different input scenarios.

Unit Tests for Feature Module:

  • Added tests in test/feature.test.ts for the Feature class, covering methods like zipDirectory, packagesProcess, copyFiles, installDeps, remove, and runCommands. Mocked dependencies such as fs, JSZip, and child_process to simulate file operations, zipping, and command execution.

@damianpolak damianpolak merged commit 131fdfc into main May 14, 2025
3 checks passed
@damianpolak damianpolak deleted the workspace/tests-and-workflows branch May 14, 2025 10:46
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