Skip to content

Optimize CI/CD pipeline with workspace-detector for changed packages #524

@dodok8

Description

@dodok8

Summary

Add workspace-detector workflow to optimize CI/CD pipeline by detecting changed packages and running tests, lints, and publish operations only on affected packages.

Affected Area

  • GitHub Actions workflow configuration
  • CI/CD pipeline (test, lint, publish jobs)
  • @fedify/cli package testing

Reason / Context

Currently, the CI/CD pipeline runs tests, lints, and publish operations on all packages regardless of which files were actually changed. This wastes CI resources and increases build times unnecessarily. By implementing a workspace-detector workflow, we can:

  • Identify which packages have been modified in a given PR or commit
  • Run tests and lints only on changed packages
  • Optimize CI execution time and resource usage
  • Add conditional logic to run deno task test-init specifically when @fedify/cli is changed.

This approach is especially valuable in a monorepo with multiple packages where changes are often isolated to specific packages.

Checklist

  1. Implement workspace-detector workflow to detect changed packages
  2. Integrate workspace-detector output into existing test workflows
  3. Update lint workflow to only run on changed packages
  4. Update the publish workflow to only publish changed packages
  5. Add a conditional step to run the deno task test-init when @fedify/cli is modified
  6. Test the workflow with sample PRs affecting different packages
  7. Update documentation if needed

Metadata

Metadata

Assignees

No one assigned

    Labels

    component/buildBuild system and packagingcomponent/ciCI/CD workflows and GitHub Actionscomponent/cliCLI tools relatedtype/choreBuild, configuration, and maintenance tasks

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions