Description
We need to implement a workflow that automatically installs the newly updated npm package, runs its shell command, and tests if the package works as expected. This will ensure that the package is functional after installation, preventing errors in production due to errors caused by updated dependencies.
Checklist:
-
Install Package Locally:
Usepnpm pack
andpnpm add -g
to install thefastify-swc-server
CLI package globally in the GitHub Actions environment. -
Run CLI Command:
Use the globally installedfastify-swc-server
command to generate a new Fastify SWC server project in thetest-fastify-project
directory. -
Verify Project Structure:
Check the generated project directory for the expected files and folder structure. -
Build and Run Project:
Usepnpm install
,pnpm run build
, andpnpm dev
to verify the project builds successfully and runs in development mode. -
Handle Errors Gracefully:
Log meaningful error messages and fail the workflow if the CLI command, dependency installation, build, or server execution fails. -
Automate the Process in GitHub Actions:
Automate the validation workflow in GitHub Actions to trigger on every pull request, ensuring the CLI continues to function correctly as the codebase evolves. -
Transition the
git clone
command executed in thebin
script to support HTTPS. -
Upgrade the minimum Node.js version requirement to v20.