Skip to content

Commit 88f9473

Browse files
committed
skip running docker containers outside of linux runners
1 parent 25cadb6 commit 88f9473

File tree

1 file changed

+6
-0
lines changed
  • packages/adders/_tests/drizzle

1 file changed

+6
-0
lines changed

packages/adders/_tests/drizzle/test.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import fs from 'node:fs';
22
import path from 'node:path';
3+
import process from 'node:process';
34
import { fileURLToPath } from 'node:url';
45
import { execSync } from 'node:child_process';
56
import * as vitest from 'vitest';
@@ -10,7 +11,11 @@ import { pageServer, pageComp } from './fixtures.ts';
1011

1112
const { test, variants, prepareServer } = setupTest({ drizzle });
1213

14+
// only linux is supported for running docker containers in github runners
15+
const noDocker = process.env.CI && process.platform !== 'linux';
16+
1317
vitest.beforeAll(() => {
18+
if (noDocker) return;
1419
const cwd = path.dirname(fileURLToPath(import.meta.url));
1520
execSync('docker compose up --detach', { cwd, stdio: 'pipe' });
1621

@@ -33,6 +38,7 @@ const testCases = [
3338
test.concurrent.for(testCases)(
3439
'queries database - $name - $variant',
3540
async ({ options, variant }, { page, ...ctx }) => {
41+
if (options.docker && noDocker) ctx.skip();
3642
const cwd = await ctx.run(variant, { drizzle: options as any });
3743

3844
const ts = variant === 'kit-ts';

0 commit comments

Comments
 (0)