diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e3590b1..0431c16 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,7 +9,10 @@ on: jobs: test: name: Test - runs-on: ubuntu-latest + strategy: + matrix: + os: [ubuntu-latest, windows-latest] + runs-on: ${{ matrix.os }} timeout-minutes: 10 steps: @@ -27,9 +30,11 @@ jobs: run_install: true - name: Lint + if: ${{ matrix.os == 'ubuntu-latest' }} run: pnpm lint - - name: Typecheck + - name: Type check + if: ${{ matrix.os == 'ubuntu-latest' }} run: pnpm type-check - name: Build diff --git a/tests/specs/patched/lightningcss.spec.ts b/tests/specs/patched/lightningcss.spec.ts index 7786b9b..e9eac04 100644 --- a/tests/specs/patched/lightningcss.spec.ts +++ b/tests/specs/patched/lightningcss.spec.ts @@ -262,7 +262,7 @@ export default testSuite(({ describe }) => { test('devSourcemap with Vue.js', async () => { await using fixture = await createFixture({ ...fixtures.vue, - node_modules: ({ symlink }) => symlink(path.resolve('node_modules')), + node_modules: ({ symlink }) => symlink(path.resolve('node_modules'), 'dir'), }); const code = await getViteDevCode(fixture.path, { diff --git a/tests/specs/patched/postcss.spec.ts b/tests/specs/patched/postcss.spec.ts index b37227b..ed6eee2 100644 --- a/tests/specs/patched/postcss.spec.ts +++ b/tests/specs/patched/postcss.spec.ts @@ -163,7 +163,7 @@ export default testSuite(({ describe }) => { await using fixture = await createFixture({ ...fixtures.multiCssModules, ...fixtures.postcssLogFile, - node_modules: ({ symlink }) => symlink(path.resolve('node_modules')), + node_modules: ({ symlink }) => symlink(path.resolve('node_modules'), 'dir'), }); const code = await getViteDevCode( @@ -193,7 +193,7 @@ export default testSuite(({ describe }) => { test('devSourcemap', async () => { await using fixture = await createFixture({ ...fixtures.cssModulesValues, - node_modules: ({ symlink }) => symlink(path.resolve('node_modules')), + node_modules: ({ symlink }) => symlink(path.resolve('node_modules'), 'dir'), }); const code = await getViteDevCode( @@ -275,7 +275,7 @@ export default testSuite(({ describe }) => { test('devSourcemap with Vue.js', async () => { await using fixture = await createFixture({ ...fixtures.vue, - node_modules: ({ symlink }) => symlink(path.resolve('node_modules')), + node_modules: ({ symlink }) => symlink(path.resolve('node_modules'), 'dir'), }); const code = await getViteDevCode(fixture.path, { @@ -718,7 +718,7 @@ export default testSuite(({ describe }) => { test('dev server', async () => { await using fixture = await createFixture({ ...fixtures.cssModulesValues, - node_modules: ({ symlink }) => symlink(path.resolve('node_modules')), + node_modules: ({ symlink }) => symlink(path.resolve('node_modules'), 'dir'), }); const code = await getViteDevCode(fixture.path, { diff --git a/tests/specs/reproductions.spec.ts b/tests/specs/reproductions.spec.ts index f784e35..f715a56 100644 --- a/tests/specs/reproductions.spec.ts +++ b/tests/specs/reproductions.spec.ts @@ -62,7 +62,7 @@ export default testSuite(({ describe }) => { await using fixture = await createFixture({ ...fixtures.multiCssModules, ...fixtures.postcssLogFile, - node_modules: ({ symlink }) => symlink(path.resolve('node_modules')), + node_modules: ({ symlink }) => symlink(path.resolve('node_modules'), 'dir'), }); const code = await getViteDevCode(fixture.path); @@ -86,7 +86,7 @@ export default testSuite(({ describe }) => { test('devSourcemap', async () => { await using fixture = await createFixture({ ...fixtures.cssModulesValues, - node_modules: ({ symlink }) => symlink(path.resolve('node_modules')), + node_modules: ({ symlink }) => symlink(path.resolve('node_modules'), 'dir'), }); const code = await getViteDevCode(fixture.path, { @@ -129,7 +129,7 @@ export default testSuite(({ describe }) => { test('devSourcemap with Vue.js', async () => { await using fixture = await createFixture({ ...fixtures.vue, - node_modules: ({ symlink }) => symlink(path.resolve('node_modules')), + node_modules: ({ symlink }) => symlink(path.resolve('node_modules'), 'dir'), }); const code = await getViteDevCode(fixture.path, { diff --git a/tests/utils/vite.ts b/tests/utils/vite.ts index 0ea81be..a66478f 100644 --- a/tests/utils/vite.ts +++ b/tests/utils/vite.ts @@ -12,6 +12,7 @@ export const viteBuild = async ( await fs.symlink( path.resolve('node_modules'), path.join(fixturePath, 'node_modules'), + 'dir', ); } catch {}