Skip to content

Commit 6d7afab

Browse files
committed
fix(action): add node 22 setup, remove --min passthrough, fix frozen-lockfile
- Add actions/setup-node@v4 with node 22 (globSync requires it) - Remove --min flag from drift ci call (reads from config instead) - Change bun install --frozen-lockfile to bun install (no lockfile exists) - Add --min <number> option to drift ci command for CLI override
1 parent 94d9d6d commit 6d7afab

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

action/action.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ outputs:
4545
runs:
4646
using: 'composite'
4747
steps:
48+
- name: Setup Node.js
49+
uses: actions/setup-node@v4
50+
with:
51+
node-version: '22'
52+
4853
- name: Setup Bun
4954
uses: oven-sh/setup-bun@v2
5055

@@ -66,7 +71,7 @@ runs:
6671
if [ "${{ inputs.include-private }}" = "true" ]; then
6772
ARGS="$ARGS --private"
6873
fi
69-
drift ci $ARGS --min ${{ inputs.min-coverage }}
74+
drift ci $ARGS
7075
7176
- name: Docs sync on merge
7277
if: >
@@ -80,5 +85,5 @@ runs:
8085
ANTHROPIC_API_KEY: ${{ inputs.anthropic-key }}
8186
run: |
8287
cd $GITHUB_ACTION_PATH
83-
bun install --frozen-lockfile
88+
bun install
8489
bun run docs-sync.ts

packages/cli/src/commands/ci.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,8 @@ export function registerCiCommand(program: Command): void {
162162
.description('Run CI checks on changed packages')
163163
.option('--all', 'Check all packages, not just changed ones')
164164
.option('--private', 'Include private packages')
165-
.action(async (options: { all?: boolean; private?: boolean }) => {
165+
.option('--min <number>', 'Minimum coverage percentage (0-100)')
166+
.action(async (options: { all?: boolean; private?: boolean; min?: string }) => {
166167
const startTime = Date.now();
167168
const version = getVersion();
168169
const cwd = process.cwd();
@@ -183,7 +184,7 @@ export function registerCiCommand(program: Command): void {
183184

184185
if (packageDirs.length === 0) packageDirs = allDirs;
185186

186-
let minThreshold = config.coverage?.min ?? 0;
187+
let minThreshold = options.min ? Number(options.min) : (config.coverage?.min ?? 0);
187188
if (minThreshold > 0 && config.coverage?.ratchet) {
188189
const ratchet = computeRatchetMin(minThreshold);
189190
minThreshold = ratchet.effectiveMin;

0 commit comments

Comments
 (0)