Skip to content

fix(ci): run cli tests via script and set HOME to runner temp #14

fix(ci): run cli tests via script and set HOME to runner temp

fix(ci): run cli tests via script and set HOME to runner temp #14

Workflow file for this run

name: Drift Dogfood
on:
pull_request:
branches: [main, master]
paths:
- 'packages/**'
- 'action/**'
- 'docs/**'
- '.github/workflows/drift.yml'
- 'README.md'
- 'package.json'
- 'bun.lock'
push:
branches: [main, master]
paths:
- 'packages/**'
- 'action/**'
- 'docs/**'
- '.github/workflows/drift.yml'
- 'README.md'
- 'package.json'
- 'bun.lock'
jobs:
gate:
name: Dogfood Gate
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install dependencies
run: bun install
- name: Run CLI tests
env:
HOME: ${{ runner.temp }}
run: cd packages/cli && bun run test
- name: Run SDK tests
env:
HOME: ${{ runner.temp }}
run: cd packages/sdk && bun test
- name: Scan thresholds
env:
HOME: ${{ runner.temp }}
run: |
bun run packages/cli/src/drift.ts scan --cwd packages/spec --min 10
bun run packages/cli/src/drift.ts scan --cwd packages/cli --min 60
bun run packages/cli/src/drift.ts scan --cwd packages/sdk --min 80
- name: CI threshold
env:
HOME: ${{ runner.temp }}
run: bun run packages/cli/src/drift.ts ci --all --min 10