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

Add a GitHub Actions workflow for automated testing of the installed npm package #15

Closed
8 tasks done
mattfsourcecode opened this issue Jan 29, 2025 · 0 comments · Fixed by #29
Closed
8 tasks done

Comments

@mattfsourcecode
Copy link
Owner

mattfsourcecode commented Jan 29, 2025

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:
    Use pnpm pack and pnpm add -g to install the fastify-swc-server CLI package globally in the GitHub Actions environment.

  • Run CLI Command:
    Use the globally installed fastify-swc-server command to generate a new Fastify SWC server project in the test-fastify-project directory.

  • Verify Project Structure:
    Check the generated project directory for the expected files and folder structure.

  • Build and Run Project:
    Use pnpm install, pnpm run build, and pnpm 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 thegit clone command executed in the bin script to support HTTPS.

  • Upgrade the minimum Node.js version requirement to v20.

@mattfsourcecode mattfsourcecode changed the title Automate testing of installed npm package Add a GitHub Actions workflow to automate testing of the installed npm package Jan 31, 2025
@mattfsourcecode mattfsourcecode changed the title Add a GitHub Actions workflow to automate testing of the installed npm package Add a GitHub Actions workflow for automated testing of the installed npm package Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant