Skip to content

fix(tests): load .env from workspace root after monorepo move #38

fix(tests): load .env from workspace root after monorepo move

fix(tests): load .env from workspace root after monorepo move #38

Workflow file for this run

name: CI
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
jobs:
quality:
name: Quality
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22.x'
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Biome check
run: pnpm exec biome check packages/domain-mcp/src packages/domain-mcp/test
- name: Type check
run: pnpm --filter domain-mcp run typecheck
- name: Knip
run: pnpm --filter domain-mcp run knip
- name: Commitlint (PR commits)
if: github.event_name == 'pull_request'
run: pnpm exec commitlint --from=${{ github.event.pull_request.base.sha }} --to=${{ github.event.pull_request.head.sha }} --verbose
- name: Publint
run: pnpm --filter domain-mcp run publint
- name: Check types export (attw)
run: pnpm --filter domain-mcp run attw
- name: Check size
run: pnpm --filter domain-mcp run size
- name: Gitleaks
uses: gitleaks/gitleaks-action@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
test:
name: Test & Build
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x, 22.x]
steps:
- uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Test
run: pnpm --filter domain-mcp run test
- name: Build
run: pnpm --filter domain-mcp run build
publish:
name: Publish to npm
runs-on: ubuntu-latest
needs: [quality, test]
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22.x'
registry-url: 'https://registry.npmjs.org'
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build
run: pnpm --filter domain-mcp run build
- name: Publish to npm
run: pnpm --filter domain-mcp publish --no-git-checks --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}