Skip to content

Commit bca04df

Browse files
authored
ci: speedup windows integrations tests (#14485)
- Avoid cross-device copying in Windows CI by setting the tests dir to the same drive as the workspace. - Disable LTO and use a faster linker for the Rust build Buid: ~3min -> ~2min Integration Tests: ~8min -> ~3min20s
1 parent 0daaaeb commit bca04df

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ jobs:
5757

5858
- name: Build
5959
run: pnpm run build
60+
env:
61+
CARGO_PROFILE_RELEASE_LTO: 'off'
62+
CARGO_TARGET_X86_64_PC_WINDOWS_MSVC_LINKER: 'lld-link'
6063

6164
- name: Lint
6265
run: pnpm run lint
@@ -68,6 +71,8 @@ jobs:
6871

6972
- name: Integration Tests
7073
run: pnpm run test:integrations
74+
env:
75+
GITHUB_WORKSPACE: ${{ github.workspace }}
7176

7277
- name: Install Playwright Browsers
7378
run: npx playwright install --with-deps

integrations/utils.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import killPort from 'kill-port'
44
import { exec, spawn } from 'node:child_process'
55
import fs from 'node:fs/promises'
66
import net from 'node:net'
7-
import { homedir, platform, tmpdir } from 'node:os'
7+
import { platform, tmpdir } from 'node:os'
88
import path from 'node:path'
99
import { test as defaultTest, expect } from 'vitest'
1010

@@ -63,7 +63,8 @@ const ASSERTION_TIMEOUT = IS_WINDOWS ? 10000 : 5000
6363

6464
// On Windows CI, tmpdir returns a path containing a weird RUNNER~1 folder that
6565
// apparently causes the vite builds to not work.
66-
const TMP_ROOT = process.env.CI && IS_WINDOWS ? homedir() : tmpdir()
66+
const TMP_ROOT =
67+
process.env.CI && IS_WINDOWS ? path.dirname(process.env.GITHUB_WORKSPACE!) : tmpdir()
6768

6869
export function test(
6970
name: string,

0 commit comments

Comments
 (0)