diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 083041bff..7d91fbe2b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -6,27 +6,9 @@ on: - main jobs: - lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v4 - with: - node-version: '20.x' - cache: "npm" - cache-dependency-path: package-lock.json - - run: npm config set fund false && npm set audit false - - run: npm ci - # Test that the packaging works as well - - run: npm pack --workspaces - - run: npm run lint test: - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest, windows-latest-x64] - name: test - ${{ matrix.os }} - runs-on: ${{ matrix.os }} + name: test - windows-self-hosted-arm64 + runs-on: [self-hosted, Windows, ARM64, checkly-cli] steps: - uses: actions/checkout@v3 - uses: actions/setup-node@v4 @@ -44,34 +26,7 @@ jobs: - name: Save LLM rules as an artifact uses: actions/upload-artifact@v4 with: - name: llm-rules-test-${{ matrix.os }} + name: llm-rules-test-windows-self-hosted-arm64 if-no-files-found: error path: packages/cli/dist/ai-context/* retention-days: 1 - test-e2e: - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest, windows-latest-x64] - name: test-e2e - ${{ matrix.os }} - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v4 - with: - node-version: '20.x' - cache: "npm" - cache-dependency-path: package-lock.json - - uses: pnpm/action-setup@v5 - with: - version: 10 - - run: npm config set fund false && npm set audit false - - run: npm ci - - run: npm run prepack - - run: npm run test:e2e - env: - CHECKLY_ACCOUNT_NAME: ${{ secrets.E2E_CHECKLY_ACCOUNT_NAME }} - CHECKLY_ACCOUNT_ID: ${{ secrets.E2E_CHECKLY_ACCOUNT_ID }} - CHECKLY_API_KEY: ${{ secrets.E2E_CHECKLY_API_KEY }} - CHECKLY_EMPTY_ACCOUNT_ID: ${{ secrets.E2E_EMPTY_CHECKLY_ACCOUNT_ID }} - CHECKLY_EMPTY_API_KEY: ${{ secrets.E2E_EMPTY_CHECKLY_API_KEY }} diff --git a/packages/cli/src/testing/fixture-sandbox.ts b/packages/cli/src/testing/fixture-sandbox.ts index 6c4a0d812..277776fef 100644 --- a/packages/cli/src/testing/fixture-sandbox.ts +++ b/packages/cli/src/testing/fixture-sandbox.ts @@ -82,10 +82,16 @@ export class FixtureSandbox { const root = maybeRoot ? await fs.mkdir(maybeRoot, { recursive: true }).then(() => maybeRoot) - // tmpdir() on macOS usually returns a path starting with /var which is - // a symlink. Resolve the path so that we don't run into path mismatch - // issues. - : await fs.realpath(await fs.mkdtemp(path.join(tmpdir(), 'fixture-sandbox-'))) + : process.platform === 'win32' + // fs.realpath uses GetFinalPathNameByHandle on Windows, which fails + // with EISDIR on virtual filesystems that don't register with the + // Mount Manager (e.g. ImDisk RAM disks). tmpdir() on Windows is + // never a symlink, so skipping realpath is safe. + ? await fs.mkdtemp(path.join(tmpdir(), 'fixture-sandbox-')) + // tmpdir() on macOS usually returns a path starting with /var which is + // a symlink. Resolve the path so that we don't run into path mismatch + // issues. + : await fs.realpath(await fs.mkdtemp(path.join(tmpdir(), 'fixture-sandbox-'))) debug(`Using root ${root}`)