Skip to content

Optimize Angular CI workflow#1357

Merged
josemontespg merged 12 commits intogoogle:mainfrom
josemontespg:speed-up-angular-ci
May 8, 2026
Merged

Optimize Angular CI workflow#1357
josemontespg merged 12 commits intogoogle:mainfrom
josemontespg:speed-up-angular-ci

Conversation

@josemontespg
Copy link
Copy Markdown
Collaborator

@josemontespg josemontespg commented May 7, 2026

Optimize Angular CI Workflow

This PR aims to speed up the Angular CI workflow (ng_build_and_test.yml).

Approach

  1. Aggressive Caching: Added caching for node_modules and .wireit directories across the repository to speed up the install and build phases.
  2. Matrix Strategy: Replaced the single job parallelization with a matrix strategy to run tests and sample builds in parallel across 4 separate jobs. This avoids CPU contention on a single runner.
  3. Removed Redundant Step: Removed the manual build of the renderer since it was already handled by the postinstall script during npm i.

Results

  • Original Time: ~3 minutes
  • Final Time: ~1 minute 15 seconds (longest matrix job)
  • Speedup: ~2.5x
image

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

@josemontespg josemontespg marked this pull request as ready for review May 7, 2026 18:01
@josemontespg josemontespg enabled auto-merge (squash) May 7, 2026 18:02
@ditman
Copy link
Copy Markdown
Collaborator

ditman commented May 8, 2026

(I left a comment in the React one that applies to this one as well!)

@josemontespg
Copy link
Copy Markdown
Collaborator Author

(I left a comment in the React one that applies to this one as well!)

The tasks in the matrix are ran in parallel. Having a sequential lint check would add to the total execution time. Also added complexity to the workflow. I would prefer to keep this as is. There is a separate formatter action that should do most of the linting, although currently that does not include eslint.

Please approve if you agree with the changes. We can always tweak after for incremental improvements

Copy link
Copy Markdown
Collaborator

@ditman ditman left a comment

Choose a reason for hiding this comment

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

Let's go!

@josemontespg josemontespg merged commit 4b78468 into google:main May 8, 2026
16 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in A2UI May 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants