Skip to content

[GRO-189] adding evals to mcp server, ci evals #58

[GRO-189] adding evals to mcp server, ci evals

[GRO-189] adding evals to mcp server, ci evals #58

Workflow file for this run

name: CI/CD Pipeline
on:
pull_request:
branches: [main]
push:
branches: [main]
jobs:
test:
name: Test and Lint
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'pnpm'
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 8
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Run linting
run: pnpm lint
- name: Check formatting
run: pnpm prettier:check
- name: Build project
run: pnpm build
- name: Run evaluation tests
env:
BROWSERBASE_API_KEY: ${{ secrets.BROWSERBASE_API_KEY }}
BROWSERBASE_PROJECT_ID: ${{ secrets.BROWSERBASE_PROJECT_ID }}
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
run: |
pnpm test
publish:
name: Publish to NPM
runs-on: ubuntu-latest
needs: test
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'pnpm'
registry-url: 'https://registry.npmjs.org'
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 8
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Configure git
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
- name: Bump version
id: version
run: |
# Get current version from package.json
CURRENT_VERSION=$(node -p "require('./package.json').version")
echo "current_version=$CURRENT_VERSION" >> $GITHUB_OUTPUT
# Bump minor version
npm version minor --no-git-tag-version
# Get new version
NEW_VERSION=$(node -p "require('./package.json').version")
echo "new_version=$NEW_VERSION" >> $GITHUB_OUTPUT
# Commit version bump
git add package.json pnpm-lock.yaml
git commit -m "chore: bump version to $NEW_VERSION [skip ci]"
- name: Build for production
run: pnpm build
- name: Publish to NPM
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: pnpm publish --no-git-checks
- name: Create git tag
run: |
git tag "v${{ steps.version.outputs.new_version }}"
- name: Push changes and tags
run: |
git push origin main
git push origin "v${{ steps.version.outputs.new_version }}"