Skip to content

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

Closed
@mattfsourcecode

Description

@mattfsourcecode

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions