Skip to content

test(blog): add simple regression test for trailingSlash (AI-assisted) #6556

test(blog): add simple regression test for trailingSlash (AI-assisted)

test(blog): add simple regression test for trailingSlash (AI-assisted) #6556

Workflow file for this run

name: Windows Tests
on:
pull_request:
branches:
- main
- docusaurus-v**
paths:
- package.json
- pnpm-lock.yaml
- vitest.config.ts
- test/**
- packages/**
- tsconfig.*.json
- .github/workflows/tests-windows.yml
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions:
contents: read
jobs:
windows-test:
name: Windows Tests
timeout-minutes: 30
runs-on: windows-latest
strategy:
matrix:
node: ['24.14', '26']
steps:
- name: Support longpaths
run: git config --system core.longpaths true
- name: Checkout
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Install pnpm
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: ${{ matrix.node }}
cache: pnpm
- name: Installation
run: pnpm install --frozen-lockfile || pnpm install --frozen-lockfile || pnpm install --frozen-lockfile
- name: Docusaurus Tests
run: pnpm test
- name: Create a deep path
# https://github.com/facebook/docusaurus/pull/4899
# https://github.com/facebook/docusaurus/issues/5793
run: |
mkdir -p "website/_dogfooding/_pages tests/deep-file-path-test/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar"
cd "$_"
echo "# hello" > test-file.md
# Lightweight version of tests-swizzle.yml workflow, but for Windows
- name: Swizzle Wrap TS
run: pnpm --filter website test:swizzle:wrap:ts
- name: Docusaurus Build
run: pnpm build:website:fast
env:
DOCUSAURUS_PERF_LOGGER: 'true'
- name: TypeCheck website
# see https://github.com/facebook/docusaurus/pull/10486
run: pnpm --filter website typecheck
- name: TypeCheck website - min version - v6.0
run: |
pnpm add typescript@6.0 --save-exact -D -w --ignore-scripts
pnpm --filter website typecheck
- name: TypeCheck website - max version - Latest
# For latest TS there are often lib check errors, so we disable it
# Details: https://github.com/facebook/docusaurus/pull/10486
run: |
pnpm add typescript@latest --save-exact -D -w --ignore-scripts
pnpm --filter website typecheck --project tsconfig.skipLibCheck.json