Skip to content

chore: CI - build - reusable workflow artifacts - #28122

Open
dulmandakh wants to merge 2 commits into
prisma:v7from
dulmandakh:ci-build
Open

chore: CI - build - reusable workflow artifacts#28122
dulmandakh wants to merge 2 commits into
prisma:v7from
dulmandakh:ci-build

Conversation

@dulmandakh

@dulmandakh dulmandakh commented Sep 17, 2025

Copy link
Copy Markdown
Contributor

This PR introduces build workflow that other workflows should depend to re-use build artifacts as cache to save time. Once this PR lands confirming that we can save time using build artifacts, I'll work on CI optimization utilizing turbo caching.

@dulmandakh

Copy link
Copy Markdown
Contributor Author

@aqrln please approve workflows

@dulmandakh
dulmandakh marked this pull request as ready for review October 9, 2025 20:25
Copilot AI review requested due to automatic review settings October 9, 2025 20:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 introduces a dedicated build workflow that other CI workflows will depend on to reuse build artifacts as cache, aiming to optimize CI performance by avoiding redundant builds.

Key changes:

  • Creates a new Build workflow that runs on pull requests and builds across multiple Node.js versions
  • Updates bundle-size workflow to depend on the Build workflow completion via workflow_run trigger
  • Adds turbo caching setup in the shared setup action to enable build artifact reuse

Reviewed Changes

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

File Description
.github/workflows/build.yml New workflow that builds the project across Node.js versions 18, 20, 22, and 24
.github/workflows/bundle-size.yml Updated to trigger after Build workflow completion and re-enabled TSC and build steps
.github/actions/setup/action.yml Added turbo cache configuration and offline-preferred pnpm install

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

Comment thread .github/workflows/bundle-size.yml Outdated
Comment on lines 4 to 8
workflow_run:
workflows: [Build]
types:
- completed
paths-ignore:

Copilot AI Oct 9, 2025

Copy link

Choose a reason for hiding this comment

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

The paths-ignore configuration at line 8 will not work with workflow_run triggers. The paths-ignore filter only applies to direct event triggers like pull_request or push, not to workflow_run events. Consider moving the path filtering logic to the Build workflow or using conditional job execution based on changed files.

Copilot uses AI. Check for mistakes.
Comment thread .github/workflows/bundle-size.yml
uses: actions/cache@v4
with:
path: .turbo
key: ${{ runner.os }}-node-${{ inputs.node-version }}-turbo-${{ github.sha }}

Copilot AI Oct 9, 2025

Copy link

Choose a reason for hiding this comment

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

Using github.sha in the cache key means each commit will create a new cache entry, preventing cache reuse across commits. Consider using a more stable key like ${{ hashFiles('**/pnpm-lock.yaml', 'turbo.json') }} to enable cache sharing between commits with the same dependencies and turbo configuration.

Suggested change
key: ${{ runner.os }}-node-${{ inputs.node-version }}-turbo-${{ github.sha }}
key: ${{ runner.os }}-node-${{ inputs.node-version }}-turbo-${{ hashFiles('**/pnpm-lock.yaml', 'turbo.json') }}

Copilot uses AI. Check for mistakes.
@dulmandakh dulmandakh changed the title chore: CI - build chore: CI - build - reusable workflow Oct 9, 2025
@dulmandakh dulmandakh changed the title chore: CI - build - reusable workflow chore: CI - build - reusable workflow artifacts Oct 9, 2025
@tensordreams
tensordreams changed the base branch from main to v7 July 21, 2026 12:11
@tensordreams
tensordreams changed the base branch from v7 to main July 21, 2026 15:16
@tensordreams
tensordreams changed the base branch from main to v7 July 28, 2026 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants