Skip to content

Conversation

@L16-code
Copy link

chore(ci): add matrix workflow to build demo apps [skip i18n]

This PR introduces a GitHub Actions workflow that builds each demo app in isolation using a matrix:

  • demo/next-app
  • demo/vite-project
  • demo/adonisjs
  • demo/react-router-app

Key improvements:

  • Consistent Node (20.12.2) and pnpm (9.12.3) setup
  • pnpm store and Turbo cache for faster CI runs
  • Turbo filtered builds per demo to catch regressions early
  • Build logs uploaded as artifacts on failure for easier debugging

Context and rationale: Fixes #1355

Copy link

@amankamlesh amankamlesh left a comment

Choose a reason for hiding this comment

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

@krsunny99 can you send link of your github action showing workspace running fine

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 adds a new GitHub Actions workflow to build demo applications in isolation using a matrix strategy, improving the CI pipeline's ability to catch regressions early in individual demo apps.

  • Implements matrix builds for 4 demo apps (next-app, vite-project, adonisjs, react-router-app)
  • Adds pnpm store and Turbo caching to optimize build performance
  • Captures build logs as artifacts on failure for easier debugging

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

run: echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT

- name: Restore pnpm cache
uses: actions/cache@v3
Copy link

Copilot AI Nov 12, 2025

Choose a reason for hiding this comment

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

The actions/cache@v3 action is outdated. Since actions/upload-artifact@v4 is being used elsewhere in this workflow (line 66), it would be more consistent to use actions/cache@v4 here as well. Using the latest version provides better performance and compatibility with current GitHub Actions infrastructure.

Suggested change
uses: actions/cache@v3
uses: actions/cache@v4

Copilot uses AI. Check for mistakes.
CI: true
run: |
mkdir -p logs
pnpm turbo build --force --filter ./demo/${{ matrix.app }} 2>&1 | tee logs/build-${{ matrix.app }}.log
Copy link

Copilot AI Nov 12, 2025

Choose a reason for hiding this comment

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

The --force flag forces Turbo to rebuild without using cache, which defeats the purpose of setting up Turbo caching in line 54-55. This will significantly slow down CI runs. Consider removing the --force flag to allow Turbo to use its cache for faster builds, or document why cache invalidation is necessary for these builds.

Suggested change
pnpm turbo build --force --filter ./demo/${{ matrix.app }} 2>&1 | tee logs/build-${{ matrix.app }}.log
pnpm turbo build --filter ./demo/${{ matrix.app }} 2>&1 | tee logs/build-${{ matrix.app }}.log

Copilot uses AI. Check for mistakes.
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.

Build Fails Without Workflow Configuration

3 participants