Skip to content

refactor(ci): split CI workflow and optimize path filtering#14107

Closed
Boshen wants to merge 1 commit intomainfrom
refactor-ci-workflows
Closed

refactor(ci): split CI workflow and optimize path filtering#14107
Boshen wants to merge 1 commit intomainfrom
refactor-ci-workflows

Conversation

@Boshen
Copy link
Member

@Boshen Boshen commented Sep 25, 2025

Summary

This PR refactors the CI workflow by splitting jobs that use path filtering into separate workflow files and optimizing the use of path filters.

Goal is to reduce total number of CI jobs.

Changes

1. Split CI workflow into multiple files

Moved jobs using dorny/paths-filter to dedicated workflow files:

  • test-wasm32.yml - WASM32 testing
  • test-napi.yml - NAPI testing
  • conformance.yml - Conformance testing
  • minification.yml - Minification size checks
  • allocations.yml - Memory allocation checks
  • ast-changes.yml - AST code generation checks
  • linter-codegen.yml - Linter code generation checks

2. Optimized path filtering approach

  • Native GitHub path filters (with YAML anchors): Used for workflows with positive path patterns:

    • minification.yml
    • allocations.yml
    • linter-codegen.yml
  • dorny/paths-filter: Kept for workflows that require it:

    • test-wasm32.yml - Uses negative patterns (exclusions)
    • test-napi.yml - Uses negative patterns with predicate-quantifier
    • ast-changes.yml - References external YAML file for paths
  • No path filters:

    • conformance.yml - Uses complex negative patterns, runs on all changes

Benefits

  • Better organization: Each workflow has a clear, focused purpose
  • Improved maintainability: Smaller, more manageable workflow files
  • Optimized performance: Native path filters are faster where applicable
  • Reduced dependencies: Less reliance on external actions where possible
  • DRY principle: YAML anchors prevent duplication within workflows

Testing

All workflows have been tested with their respective path filtering configurations. The split maintains the same functionality while improving code organization.

Copilot AI review requested due to automatic review settings September 25, 2025 06:25
@graphite-app
Copy link
Contributor

graphite-app bot commented Sep 25, 2025

How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

@github-actions github-actions bot added the C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior label Sep 25, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the CI workflow by splitting path-filtered jobs into separate workflow files and optimizing path filtering approaches to improve organization and maintainability.

  • Extracted path-filtered jobs from the main CI workflow into dedicated workflow files
  • Optimized path filtering by using native GitHub path filters with YAML anchors where possible
  • Maintained dorny/paths-filter only where complex patterns or external file references are required

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
.github/workflows/ci.yml Removed 6 path-filtered jobs that were moved to separate workflows
.github/workflows/test-wasm32.yml New workflow for WASM32 testing with negative path patterns using dorny/paths-filter
.github/workflows/test-napi.yml New workflow for NAPI testing with multiple negative patterns and predicate-quantifier
.github/workflows/conformance.yml New workflow for conformance testing without path filtering
.github/workflows/minification.yml New workflow for minification size checks using native GitHub path filters with YAML anchors
.github/workflows/allocations.yml New workflow for memory allocation checks using native GitHub path filters with YAML anchors
.github/workflows/linter-codegen.yml New workflow for linter code generation using native GitHub path filters with YAML anchors
.github/workflows/ast-changes.yml New workflow for AST code generation checks using dorny/paths-filter with external file reference

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@Boshen Boshen force-pushed the refactor-ci-workflows branch from 8ca282d to fceb4fa Compare September 25, 2025 06:27
@Boshen Boshen marked this pull request as draft September 25, 2025 06:29
…lters

- Move jobs using dorny/paths-filter to separate workflow files
- Use native GitHub workflow path filters where possible (positive patterns)
- Remove dorny/paths-filter from workflows with negative patterns (run on all changes)
- Use YAML anchors to avoid duplication between pull_request and push triggers

Breaking down the CI workflow improves:
- Workflow readability and maintainability
- Reduces external action dependencies
- Faster workflow initialization (no checkout needed for path filtering)
- More direct GitHub integration for workflows with positive path patterns
@Boshen Boshen force-pushed the refactor-ci-workflows branch from 57ac125 to 6a521ff Compare September 25, 2025 06:40
@Boshen Boshen closed this Sep 25, 2025
@Boshen Boshen deleted the refactor-ci-workflows branch September 25, 2025 06:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants