Skip to content

Conversation

@SH20RAJ
Copy link

@SH20RAJ SH20RAJ commented Oct 30, 2025

📋 Description

This PR adds a comprehensive build workflow to validate all packages, demo applications, and integrations in an isolated CI environment.

🔗 Related Issues

Fixes #1355

📝 Type of Change

  • 🔨 Build/CI configuration change

🧪 How Has This Been Tested?

The workflow includes:

  • Build Packages: Builds all packages in the monorepo
  • Build Demos: Matrix strategy to build each demo app independently (next-app, vite-project, react-router-app, adonisjs)
  • Build Integrations: Builds integration packages (directus)
  • Build Summary: Aggregates all build results

✨ Features

  • ✅ Matrix strategy for parallel builds
  • fail-fast: false to see all failures
  • ✅ Isolated build jobs for each demo app
  • ✅ Turbo cache integration for faster builds
  • ✅ Manual workflow dispatch for testing
  • ✅ Runs on push to main and pull requests

📌 Additional Notes

This workflow ensures that:

  • All demo apps build successfully before merging
  • Build failures are caught early in CI
  • Each app is built in isolation to catch dependency issues
  • Developers can see which specific apps failed

…tions

- Add .github/workflows/build.yml with matrix strategy
- Build packages, demos (next-app, vite-project, react-router-app, adonisjs), and integrations (directus) in parallel
- Use fail-fast: false to see all build failures
- Add build summary job to aggregate results
- Enable manual workflow dispatch for testing

Fixes lingodotdev#1355
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 comprehensive CI workflow to validate builds across all packages, demo applications, and integrations in the monorepo. The workflow runs on pushes to main, pull requests, and manual triggers to catch build failures early.

Key changes:

  • Introduces parallel build validation with matrix strategies for demos and integrations
  • Implements pnpm and Turbo caching for optimized build performance
  • Adds aggregated build summary job that reports on all build results

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


- name: Build all packages
run: pnpm turbo build --force

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.

This line contains trailing whitespace. Remove it for consistency with project formatting standards.

Suggested change

Copilot uses AI. Check for mistakes.

- name: Build ${{ matrix.demo }}
run: pnpm turbo build --filter=@lingo.dev/demo-${{ matrix.demo }} --force

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.

This line contains trailing whitespace. Remove it for consistency with project formatting standards.

Suggested change

Copilot uses AI. Check for mistakes.
uses: dtinth/setup-github-actions-caching-for-turbo@v1

- name: Build ${{ matrix.demo }}
run: pnpm turbo build --filter=@lingo.dev/demo-${{ matrix.demo }} --force
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 filter pattern @lingo.dev/demo-${{ matrix.demo }} doesn't match the actual package names in the demo directories. The actual package names are:

  • next-app (not @lingo.dev/demo-next-app)
  • vite-project (not @lingo.dev/demo-vite-project)
  • react-router-app (not @lingo.dev/demo-react-router-app)
  • adonis (not @lingo.dev/demo-adonisjs)

Change the filter to: --filter=${{ matrix.demo }}

Also note that the matrix value adonisjs doesn't match the package name adonis.

Copilot uses AI. Check for mistakes.
uses: dtinth/setup-github-actions-caching-for-turbo@v1

- name: Build ${{ matrix.integration }}
run: pnpm turbo build --filter=@lingo.dev/integration-${{ matrix.integration }} --force
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 filter pattern @lingo.dev/integration-${{ matrix.integration }} doesn't match the actual package name. The directus integration package is named @replexica/integration-directus, not @lingo.dev/integration-directus.

Change the filter to: --filter=@replexica/integration-${{ matrix.integration }}

Suggested change
run: pnpm turbo build --filter=@lingo.dev/integration-${{ matrix.integration }} --force
run: pnpm turbo build --filter=@replexica/integration-${{ matrix.integration }} --force

Copilot uses AI. Check for mistakes.
Comment on lines +21 to +23
uses: actions/setup-node@v4
with:
node-version: '20.12.2'
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 existing workflows (pr-check.yml and release.yml) use actions/setup-node@v2 instead of actions/setup-node@v4. For consistency across the project, consider using the same version or updating all workflows to v4.

Additionally, the existing workflows use node-version: 20.12.2 (without quotes), while this uses '20.12.2' (with quotes). While both work, consistency would be preferable.

Suggested change
uses: actions/setup-node@v4
with:
node-version: '20.12.2'
uses: actions/setup-node@v2
with:
node-version: 20.12.2

Copilot uses AI. Check for mistakes.
Comment on lines +35 to +36
- name: Setup pnpm cache
uses: actions/cache@v4
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 existing workflows (pr-check.yml and release.yml) use actions/cache@v3, while this workflow uses actions/cache@v4. For consistency across the project, consider using the same version across all workflows.

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

1 participant