Skip to content

ci(changesets): version packages #1364

ci(changesets): version packages

ci(changesets): version packages #1364

Workflow file for this run

name: PR Checks
on: [pull_request]
jobs:
commit-lint:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.ref }}-commit-lint
cancel-in-progress: true
name: Commitlint
steps:
- uses: actions/checkout@v4
- uses: wagoid/commitlint-github-action@v5
lint:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20, 22, 24]
concurrency:
group: ${{ github.ref }}-lint-${{ matrix.node-version }}
cancel-in-progress: true
name: Lint (Node ${{ matrix.node-version }})
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "pnpm"
- name: Install Dependencies
run: |
pnpm install -w
env:
NODE_OPTIONS: "--max-old-space-size=8192"
- name: Lint with Biome
run: |
pnpm lint:ci
- name: Syncpack
run: pnpm sp lint
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20, 22, 24]
concurrency:
group: ${{ github.ref }}-pr-build-${{ matrix.node-version }}
cancel-in-progress: true
name: Build (Node ${{ matrix.node-version }})
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "pnpm"
- name: Install
run: pnpm install
env:
NODE_OPTIONS: "--max-old-space-size=8192"
- name: Build
run: pnpm build:all
- name: Publint
run: pnpm publint:all
# - name: Are The Types Wrong
# run: pnpm attw:all
test-packages:
runs-on: ubuntu-latest
strategy:
matrix:
package:
- cli
- core
- create-voltagent-app
- docs-mcp
- internal
- logger
- postgres
- supabase
- voice
- server-core
- libsql
fail-fast: false
concurrency:
group: ${{ github.ref }}-test-${{ matrix.package }}
cancel-in-progress: true
name: Test ${{ matrix.package }}
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"
- name: Install Dependencies
run: pnpm install
env:
NODE_OPTIONS: "--max-old-space-size=8192"
- name: Set package scope
id: scope
run: |
if [[ "${{ matrix.package }}" == "create-voltagent-app" ]]; then
echo "scope=create-voltagent-app" >> $GITHUB_OUTPUT
else
echo "scope=@voltagent/${{ matrix.package }}" >> $GITHUB_OUTPUT
fi
- name: Build Package and Dependencies
run: lerna run build --scope "${{ steps.scope.outputs.scope }}" --include-dependencies
- name: Test Package
run: lerna run test --scope "${{ steps.scope.outputs.scope }}"
postgres-integration:
runs-on: ubuntu-latest
name: PostgreSQL Integration Tests
concurrency:
group: ${{ github.ref }}-postgres-integration
cancel-in-progress: true
services:
postgres:
image: postgres:16
env:
POSTGRES_USER: test
POSTGRES_PASSWORD: test
POSTGRES_DB: voltagent_test
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Check for PostgreSQL changes
id: check_postgres
run: |
if git diff --name-only origin/main...HEAD | grep -E '^packages/postgres/'; then
echo "postgres_changed=true" >> $GITHUB_OUTPUT
else
echo "postgres_changed=false" >> $GITHUB_OUTPUT
fi
- name: Skip if no PostgreSQL changes
if: steps.check_postgres.outputs.postgres_changed == 'false'
run: echo "No PostgreSQL changes detected, skipping integration tests"
- uses: pnpm/action-setup@v4
if: steps.check_postgres.outputs.postgres_changed == 'true'
- uses: actions/setup-node@v4
if: steps.check_postgres.outputs.postgres_changed == 'true'
with:
node-version: 20
cache: "pnpm"
- name: Install Dependencies
if: steps.check_postgres.outputs.postgres_changed == 'true'
run: pnpm install
env:
NODE_OPTIONS: "--max-old-space-size=8192"
- name: Build Core Dependencies
if: steps.check_postgres.outputs.postgres_changed == 'true'
run: pnpm build --scope @voltagent/core
- name: Run PostgreSQL Integration Tests
if: steps.check_postgres.outputs.postgres_changed == 'true'
run: |
cd packages/postgres
npm run test:integration:ci
env:
DATABASE_URL: postgresql://test:test@localhost:5432/voltagent_test