Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 5, 2025

Purpose

Add CI pipeline to validate builds across Node.js versions for packages-v1 workspace with scheduled weekly runs. The workflow is designed to run completely without package-lock.json dependency.

Does this introduce a breaking change?

[ ] Yes
[x] No

Pull Request Type

What kind of change does this Pull Request introduce?

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Documentation content changes
[ ] Other... Please describe:

How to Test

  • Get the code
git clone https://github.com/Azure-Samples/azure-typescript-langchainjs.git
cd azure-typescript-langchainjs
git checkout copilot/create-build-test-workflow
npm install
  • Test the code
npm run build

What to Check

Verify that the following are valid

  • Workflow runs on push/PR to main when packages-v1 files change
  • Matrix builds execute for Node.js 22 and 24
  • Build summary job fails if any matrix job fails
  • Workflow has minimal GITHUB_TOKEN permissions (contents: read)
  • Workflow is scheduled to run weekly on Sundays at midnight UTC
  • Workflow uses npm install for dependency installation
  • Workflow runs without requiring package-lock.json (no npm caching enabled)

Other Information

Workflow Configuration:

  • Matrix strategy with fail-fast: false ensures all Node versions tested
  • Path filters trigger only on relevant file changes (packages-v1/**, package.json, workflow file)
  • Summary job with needs: build and conditional check enforces all-pass requirement
  • Manual trigger via workflow_dispatch available for testing
  • Scheduled run every Sunday at midnight UTC (cron: '0 0 * * 0')
  • Uses npm install since package-lock.json is not tracked in the repository
  • No npm caching (cache: 'npm' removed) to eliminate package-lock.json dependency

Security:

  • Explicit permissions: contents: read follows principle of least privilege
  • Passes CodeQL workflow security analysis

Package-lock.json Independence:

  • Workflow does not use npm caching to avoid requiring package-lock.json
  • All dependencies installed fresh on each run using npm install
  • package-lock.json removed from repository
Original prompt

This section details on the original issue you should resolve

<issue_title>Create a Build and test workflow pipeline for Node.js packages in packages-v1</issue_title>
<issue_description>- use node 22 and 24

  • use a matrix of these version
  • build with npm run build
  • add a summation that only passes if all matrix items pass

There is currently no testing or linting. Just rely on npm run build. </issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Create build and test workflow pipeline for Node.js packages Add GitHub Actions workflow for packages-v1 build validation Dec 5, 2025
Copilot AI requested a review from diberry December 5, 2025 17:52
Copilot finished work on behalf of diberry December 5, 2025 17:52
cache: 'npm'

- name: Install dependencies
run: npm ci
Copy link
Contributor

Choose a reason for hiding this comment

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

use npm install instead of npm ci because package-lock.json isn't checked in.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed to npm install in commit cd655de

Copy link
Contributor

@diberry diberry left a comment

Choose a reason for hiding this comment

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

Add the schedule run on sunday night and use npm install instead of npm ci. Resolve any open comments.

Copy link
Contributor Author

Copilot AI commented Dec 5, 2025

Add the schedule run on sunday night and use npm install instead of npm ci. Resolve any open comments.

Both changes completed in commit cd655de:

  • Changed from npm ci to npm install
  • Added scheduled run on Sundays at midnight UTC
  • Removed package-lock.json from repository (was accidentally added)

Copilot AI requested a review from diberry December 5, 2025 18:15
Copilot finished work on behalf of diberry December 5, 2025 18:15
@diberry
Copy link
Contributor

diberry commented Dec 5, 2025

@copilot change this file so that it runs without the need for package-lock.json

Copy link
Contributor Author

Copilot AI commented Dec 5, 2025

@copilot change this file so that it runs without the need for package-lock.json

Removed cache: 'npm' from the workflow in commit 9c6e41b. The workflow now runs completely without package-lock.json - no caching is used and npm install runs without requiring the lock file.

Copilot AI changed the title Add GitHub Actions workflow for packages-v1 build validation Add GitHub Actions workflow for packages-v1 build validation without package-lock.json Dec 5, 2025
Copilot AI requested a review from diberry December 5, 2025 20:32
Copilot finished work on behalf of diberry December 5, 2025 20:32
@diberry diberry marked this pull request as ready for review December 5, 2025 20:33
@diberry diberry merged commit 8b16c36 into main Dec 5, 2025
7 checks passed
@diberry diberry deleted the copilot/create-build-test-workflow branch December 5, 2025 20:33
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.

Create a Build and test workflow pipeline for Node.js packages in packages-v1

2 participants