diff --git a/.github/workflows/test-windows.yml b/.github/workflows/test-windows.yml deleted file mode 100644 index 4b697c33a..000000000 --- a/.github/workflows/test-windows.yml +++ /dev/null @@ -1,131 +0,0 @@ -name: Test (Windows) - -# Controls when the action will run. -on: - # Triggers the workflow on pull request events but only for the main branch - pull_request: - branches: [main] - - push: - branches: [main] - - merge_group: - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -# A workflow run is made up of one or more jobs that can run sequentially or in parallel -jobs: - # ======== calculate changes ======== - changes: - runs-on: windows-latest - outputs: - changed: ${{ steps.changes.outputs.changed }} - strategy: - matrix: - node-version: [18] - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 10 - - - name: Install Pnpm - run: corepack enable - - - uses: dorny/paths-filter@v3 - id: changes - with: - predicate-quantifier: 'every' - filters: | - changed: - - "!**/*.md" - - "!**/*.mdx" - - "!**/_meta.json" - - "!**/dictionary.txt" - - # ======== ut ======== - ut-windows: - runs-on: windows-latest - needs: changes - if: ${{ needs.changes.outputs.changed == 'true' }} - strategy: - matrix: - node-version: [18] - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - - name: Git config - shell: bash - run: | - git config --system core.longpaths true - - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 10 - - - name: Install Pnpm - run: corepack enable - - - name: Setup Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4 - with: - node-version: ${{ matrix.node-version }} - cache: 'pnpm' - - - name: Install Dependencies - run: pnpm install - - - name: Unit Test - run: pnpm run test:unit - - # ======== integration && e2e ======== - integration-e2e-windows: - runs-on: windows-latest - needs: changes - if: ${{ needs.changes.outputs.changed == 'true' }} - strategy: - matrix: - node-version: [18] - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - - name: Git config - shell: bash - run: | - git config --system core.longpaths true - - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 10 - - - name: Install Pnpm - run: corepack enable - - - name: Setup Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4 - with: - node-version: ${{ matrix.node-version }} - cache: 'pnpm' - - - name: Install Dependencies - run: pnpm install && cd ./tests && npx playwright install - - - name: Integration Test (Vitest) - run: pnpm run test:integration - - - name: E2E Test (Playwright) - run: pnpm run test:e2e - - # ======== exit ======== - pr-check-required: - if: (!cancelled() && !failure()) - needs: [ut-windows, integration-e2e-windows] - runs-on: ubuntu-latest - name: Test passed or skipped (Windows) - steps: - - run: echo "All tests passed or skipped (Windows)." diff --git a/.github/workflows/test-ubuntu.yml b/.github/workflows/test.yml similarity index 81% rename from .github/workflows/test-ubuntu.yml rename to .github/workflows/test.yml index c1e38d222..a0c5234ce 100644 --- a/.github/workflows/test-ubuntu.yml +++ b/.github/workflows/test.yml @@ -1,4 +1,4 @@ -name: Test (Ubuntu) +name: Test # Controls when the action will run. on: @@ -47,13 +47,17 @@ jobs: - "!**/dictionary.txt" # ======== ut ======== - ut-ubuntu: - runs-on: ubuntu-latest + ut: + runs-on: ${{ matrix.os }} needs: changes if: ${{ needs.changes.outputs.changed == 'true' }} strategy: matrix: + os: [ubuntu-latest] node-version: [18, 20, 22] + include: + - node-version: 18 + os: windows-latest # Steps represent a sequence of tasks that will be executed as part of the job steps: @@ -62,6 +66,12 @@ jobs: with: fetch-depth: 10 + - name: Git config + if: ${{ matrix.os == 'windows-latest' }} + shell: bash + run: | + git config --system core.longpaths true + - name: Install Pnpm run: corepack enable @@ -78,16 +88,26 @@ jobs: run: pnpm run test:unit # ======== integration && e2e ======== - integration-e2e-ubuntu: - runs-on: ubuntu-latest + integration-e2e: + runs-on: ${{ matrix.os }} needs: changes if: ${{ needs.changes.outputs.changed == 'true' }} strategy: matrix: + os: [ubuntu-latest] node-version: [18, 20, 22] + include: + - node-version: 18 + os: windows-latest # Steps represent a sequence of tasks that will be executed as part of the job steps: + - name: Git config + if: ${{ matrix.os == 'windows-latest' }} + shell: bash + run: | + git config --system core.longpaths true + - name: Checkout uses: actions/checkout@v4 with: @@ -103,7 +123,7 @@ jobs: cache: 'pnpm' - name: Install Dependencies - run: pnpm install && cd ./tests && npx playwright install + run: pnpm install && cd ./tests && pnpx playwright install chromium - name: Integration Test (Vitest) run: pnpm run test:integration @@ -112,11 +132,11 @@ jobs: run: pnpm run test:e2e # ======== benchmark ======== - benchmark-ubuntu: + benchmark: # Only Ubuntu 20.04 and 22.04 are supported at the moment. # See https://github.com/CodSpeedHQ/action/blob/016456b513677f9d4a1c509c7f8a38d8dd55b2b0/.github/workflows/ci.yml#L19. runs-on: ubuntu-22.04 - needs: [integration-e2e-ubuntu] + needs: [integration-e2e] strategy: matrix: node-version: [20] @@ -151,8 +171,8 @@ jobs: # ======== exit ======== pr-check-required: if: (!cancelled() && !failure()) - needs: [ut-ubuntu, integration-e2e-ubuntu, benchmark-ubuntu] + needs: [ut, integration-e2e, benchmark] runs-on: ubuntu-latest - name: Test passed or skipped (Ubuntu) + name: Test passed or skipped steps: - - run: echo "All tests passed or skipped (Ubuntu)." + - run: echo "All tests passed or skipped." diff --git a/scripts/dictionary.txt b/scripts/dictionary.txt index a9514ae11..00180decb 100644 --- a/scripts/dictionary.txt +++ b/scripts/dictionary.txt @@ -83,6 +83,7 @@ picocolors pjpeg pluggable pmmmwh +pnpx postcssrc preact prebundle