From 56aa68fbc43d946fe351c4d10b1886278a3666e3 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Thu, 14 Sep 2023 11:11:54 +0100 Subject: [PATCH 01/24] ci: rework test matrix --- .github/workflows/ci.yml | 35 +++++------------------------------ package.json | 6 +++--- playground/nuxt.config.ts | 18 ++++++++++++++---- test/bridge.test.ts | 13 ++++++------- vitest.config.ts | 8 +------- 5 files changed, 29 insertions(+), 51 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3af9afbc..2ca11b5f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - node: [16] + node: [18] steps: - uses: actions/checkout@v4 @@ -72,6 +72,8 @@ jobs: matrix: os: [ubuntu-latest, windows-latest] node: [16] + env: ['dev', 'built'] + builder: ['vite', 'webpack'] steps: - uses: actions/checkout@v4 @@ -86,36 +88,10 @@ jobs: - name: Test (fixtures) run: pnpm test:fixtures - - - name: Test (fixtures with dev) - run: pnpm test:fixtures:dev env: NODE_OPTIONS: --max-old-space-size=8192 - - test-fixtures-webpack: - runs-on: ${{ matrix.os }} - - strategy: - matrix: - os: [ubuntu-latest, windows-latest] - node: [16] - - steps: - - uses: actions/checkout@v4 - - run: corepack enable - - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node }} - cache: "pnpm" - - - name: Install dependencies - run: pnpm install - - - name: Test (fixtures) - run: pnpm test:fixtures:webpack - - - name: Test (fixtures with dev) - run: pnpm test:fixtures:webpack:dev + TEST_ENV: ${{ matrix.env }} + TEST_BUILDER: ${{ matrix.builder }} test-unit: runs-on: ${{ matrix.os }} @@ -151,7 +127,6 @@ jobs: - lint - build - test-fixtures - - test-fixtures-webpack - test-unit runs-on: ${{ matrix.os }} diff --git a/package.json b/package.json index b1af1d2a..3148bfbc 100644 --- a/package.json +++ b/package.json @@ -13,9 +13,9 @@ "dev:prepare": "pnpm build:stub && nuxi prepare playground", "lint": "eslint --ext .vue,.ts,.js,.mjs .", "test:fixtures": "pnpm dev:prepare && JITI_ESM_RESOLVE=1 vitest run --dir test", - "test:fixtures:dev": "NUXT_TEST_DEV=true pnpm test:fixtures", - "test:fixtures:webpack": "TEST_WITH_WEBPACK=1 pnpm test:fixtures", - "test:fixtures:webpack:dev": "TEST_WITH_WEBPACK=1 NUXT_TEST_DEV=true pnpm test:fixtures", + "test:fixtures:dev": "TEST_ENV=dev pnpm test:fixtures", + "test:fixtures:webpack": "TEST_BUILDER=webpack pnpm test:fixtures", + "test:fixtures:webpack:dev": "TEST_BUILDER=webpack TEST_ENV=dev pnpm test:fixtures", "test:unit": "vitest run --dir packages" }, "devDependencies": { diff --git a/playground/nuxt.config.ts b/playground/nuxt.config.ts index 26555525..8f0804e2 100644 --- a/playground/nuxt.config.ts +++ b/playground/nuxt.config.ts @@ -4,6 +4,19 @@ import { defineNuxtConfig } from '@nuxt/bridge' // @ts-ignore global.__NUXT_PREPATHS__ = (global.__NUXT_PREPATHS__ || []).concat(__dirname) +const bridgeConfig = { + vite: process.env.TEST_BUILDER !== 'webpack', + // Not yet tested in matrix + nitro: process.env.TEST_NITRO !== 'false', + nitroGenerator: process.env.TEST_NITRO_GENERATOR !== 'false', + transpile: process.env.TEST_TRANSPILE !== 'false', + imports: process.env.TEST_IMPORTS !== 'false', + compatibility: process.env.TEST_COMPATIBILITY !== 'false', + meta: process.env.TEST_META !== 'false', + typescript: process.env.TEST_TYPESCRIPT !== 'false', + resolve: process.env.TEST_RESOLVE !== 'false' +} + export default defineNuxtConfig({ app: { head: { @@ -36,10 +49,7 @@ export default defineNuxtConfig({ }, plugins: ['plugins/template.ts'] }, - bridge: { - meta: true, - vite: !process.env.TEST_WITH_WEBPACK - }, + bridge: bridgeConfig, runtimeConfig: { secretKey: 'nuxt', public: { diff --git a/test/bridge.test.ts b/test/bridge.test.ts index 225eea98..073c3cf8 100644 --- a/test/bridge.test.ts +++ b/test/bridge.test.ts @@ -3,15 +3,14 @@ import { describe, expect, it } from 'vitest' import { setup, $fetch, fetch, startServer } from '@nuxt/test-utils' import { expectNoClientErrors, parseData } from './utils' -const isWebpack = process.env.TEST_WITH_WEBPACK +const isWebpack = process.env.TEST_BUILDER === 'webpack' +const isDev = process.env.TEST_ENV === 'dev' await setup({ rootDir: fileURLToPath(new URL('../playground', import.meta.url)), server: true, - dev: !!process.env.NUXT_TEST_DEV, + dev: isDev, nuxtConfig: { - // @ts-expect-error No types yet. - bridge: { vite: !isWebpack }, buildDir: process.env.NITRO_BUILD_DIR, nitro: { output: { dir: process.env.NITRO_OUTPUT_DIR } } } @@ -199,12 +198,12 @@ describe('nitro plugins', () => { }) describe('dynamic paths', () => { - if (process.env.NUXT_TEST_DEV) { + if (isDev) { // TODO: it.todo('dynamic paths in dev') return } - if (process.env.TEST_WITH_WEBPACK) { + if (isWebpack) { // TODO: it.todo('work with webpack') return @@ -219,7 +218,7 @@ describe('dynamic paths', () => { }) // Vite legacy build does not emit CSS files - it.skipIf(!process.env.TEST_WITH_WEBPACK)('adds relative paths to CSS', async () => { + it.skipIf(!isWebpack)('adds relative paths to CSS', async () => { const html = await $fetch('/assets') const urls = Array.from(html.matchAll(/(href|src)="(.*?)"/g)).map(m => m[2]) const cssURL = urls.find(u => /_nuxt\/assets.*\.css$/.test(u)) diff --git a/vitest.config.ts b/vitest.config.ts index c8f35da2..4f1b25a0 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -1,9 +1,3 @@ import { defineConfig } from 'vite' -export default defineConfig({ - test: { - deps: { - inline: [/@nuxt\/test-utils/] - } - } -}) +export default defineConfig({}) From 20ae5e1e328da9ec59991f48b827e8a4b8f1591b Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Thu, 14 Sep 2023 11:17:06 +0100 Subject: [PATCH 02/24] ci: add three more matrix conditions --- .github/workflows/ci.yml | 6 ++++++ playground/nuxt.config.ts | 8 +++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2ca11b5f..7cd16f3f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -74,6 +74,9 @@ jobs: node: [16] env: ['dev', 'built'] builder: ['vite', 'webpack'] + transpile: [true, false] + compatibility: [true, false] + resolve: [true, false] steps: - uses: actions/checkout@v4 @@ -92,6 +95,9 @@ jobs: NODE_OPTIONS: --max-old-space-size=8192 TEST_ENV: ${{ matrix.env }} TEST_BUILDER: ${{ matrix.builder }} + TEST_TRANSPILE: ${{ matrix.transpile }} + TEST_COMPATIBILITY: ${{ matrix.compatibility }} + TEST_RESOLVE: ${{ matrix.resolve }} test-unit: runs-on: ${{ matrix.os }} diff --git a/playground/nuxt.config.ts b/playground/nuxt.config.ts index 8f0804e2..3919df78 100644 --- a/playground/nuxt.config.ts +++ b/playground/nuxt.config.ts @@ -6,17 +6,19 @@ global.__NUXT_PREPATHS__ = (global.__NUXT_PREPATHS__ || []).concat(__dirname) const bridgeConfig = { vite: process.env.TEST_BUILDER !== 'webpack', + transpile: process.env.TEST_TRANSPILE !== 'false', + compatibility: process.env.TEST_COMPATIBILITY !== 'false', + resolve: process.env.TEST_RESOLVE !== 'false', // Not yet tested in matrix nitro: process.env.TEST_NITRO !== 'false', nitroGenerator: process.env.TEST_NITRO_GENERATOR !== 'false', - transpile: process.env.TEST_TRANSPILE !== 'false', imports: process.env.TEST_IMPORTS !== 'false', - compatibility: process.env.TEST_COMPATIBILITY !== 'false', meta: process.env.TEST_META !== 'false', typescript: process.env.TEST_TYPESCRIPT !== 'false', - resolve: process.env.TEST_RESOLVE !== 'false' } +console.log('Bridge config:', bridgeConfig) + export default defineNuxtConfig({ app: { head: { From 5acbcde29e1ed2fc98c9f27f187d21ca16097541 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Thu, 14 Sep 2023 11:19:05 +0100 Subject: [PATCH 03/24] ci: use more intelligible matrix names --- .github/workflows/ci.yml | 6 +++--- playground/nuxt.config.ts | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7cd16f3f..33d64ac5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -74,9 +74,9 @@ jobs: node: [16] env: ['dev', 'built'] builder: ['vite', 'webpack'] - transpile: [true, false] - compatibility: [true, false] - resolve: [true, false] + transpile: ['transpile', 'no-transpile'] + compatibility: ['compatibility', 'no-compatibility'] + resolve: ['resolve', 'no-resolve'] steps: - uses: actions/checkout@v4 diff --git a/playground/nuxt.config.ts b/playground/nuxt.config.ts index 3919df78..dde45f5d 100644 --- a/playground/nuxt.config.ts +++ b/playground/nuxt.config.ts @@ -6,9 +6,9 @@ global.__NUXT_PREPATHS__ = (global.__NUXT_PREPATHS__ || []).concat(__dirname) const bridgeConfig = { vite: process.env.TEST_BUILDER !== 'webpack', - transpile: process.env.TEST_TRANSPILE !== 'false', - compatibility: process.env.TEST_COMPATIBILITY !== 'false', - resolve: process.env.TEST_RESOLVE !== 'false', + transpile: process.env.TEST_TRANSPILE !== 'no-transpile', + compatibility: process.env.TEST_COMPATIBILITY !== 'no-compatibility', + resolve: process.env.TEST_RESOLVE !== 'no-resolve', // Not yet tested in matrix nitro: process.env.TEST_NITRO !== 'false', nitroGenerator: process.env.TEST_NITRO_GENERATOR !== 'false', From 8cb7cd0680a4dffb66b3a489ff2ccdd96c88e60c Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Thu, 14 Sep 2023 11:21:51 +0100 Subject: [PATCH 04/24] style: remove trailing comma --- playground/nuxt.config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playground/nuxt.config.ts b/playground/nuxt.config.ts index dde45f5d..265bc426 100644 --- a/playground/nuxt.config.ts +++ b/playground/nuxt.config.ts @@ -14,7 +14,7 @@ const bridgeConfig = { nitroGenerator: process.env.TEST_NITRO_GENERATOR !== 'false', imports: process.env.TEST_IMPORTS !== 'false', meta: process.env.TEST_META !== 'false', - typescript: process.env.TEST_TYPESCRIPT !== 'false', + typescript: process.env.TEST_TYPESCRIPT !== 'false' } console.log('Bridge config:', bridgeConfig) From aa9199799199b4860df9929f879e0348751196b2 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Thu, 14 Sep 2023 11:26:00 +0100 Subject: [PATCH 05/24] ci: reduce vast quantity of matrices --- .github/workflows/ci.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 33d64ac5..91be8a1f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -74,9 +74,15 @@ jobs: node: [16] env: ['dev', 'built'] builder: ['vite', 'webpack'] - transpile: ['transpile', 'no-transpile'] - compatibility: ['compatibility', 'no-compatibility'] - resolve: ['resolve', 'no-resolve'] + include: + - transpile: no-transpile + builder: vite + env: built + - compatibility: no-compatibility + builder: vite + env: built + - resolve: no-resolve + builder: webpack steps: - uses: actions/checkout@v4 From efc9bf6be9c93ccbd494477b1f3f9eacdbe540a7 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Thu, 14 Sep 2023 11:31:50 +0100 Subject: [PATCH 06/24] ci: ensure we always run default settings --- .github/workflows/ci.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 91be8a1f..e4c916b3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -72,8 +72,11 @@ jobs: matrix: os: [ubuntu-latest, windows-latest] node: [16] - env: ['dev', 'built'] - builder: ['vite', 'webpack'] + env: [dev, built] + transpile: [transpile] + compatibility: [compatibility] + resolve: [resolve] + builder: [vite, webpack] include: - transpile: no-transpile builder: vite From 3439260e5d62be09be25e06816f90123508ee65c Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Thu, 14 Sep 2023 11:33:09 +0100 Subject: [PATCH 07/24] ci: update more node versions --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e4c916b3..e181c2de 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,7 +46,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - node: [16] + node: [20] steps: - uses: actions/checkout@v4 @@ -71,7 +71,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, windows-latest] - node: [16] + node: [18] env: [dev, built] transpile: [transpile] compatibility: [compatibility] @@ -114,7 +114,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, windows-latest] - node: [16] + node: [18] steps: - uses: actions/checkout@v4 From b0ce40a00981d6cd61ac97b71912bde0cb4b2f52 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Thu, 14 Sep 2023 11:37:16 +0100 Subject: [PATCH 08/24] ci: all the quotes --- .github/workflows/ci.yml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e181c2de..29851ee0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -72,20 +72,20 @@ jobs: matrix: os: [ubuntu-latest, windows-latest] node: [18] - env: [dev, built] - transpile: [transpile] - compatibility: [compatibility] - resolve: [resolve] - builder: [vite, webpack] + env: ['dev', 'built'] + transpile: ['transpile'] + compatibility: ['compatibility'] + resolve: ['resolve'] + builder: ['vite', 'webpack'] include: - - transpile: no-transpile - builder: vite - env: built - - compatibility: no-compatibility - builder: vite - env: built - - resolve: no-resolve - builder: webpack + - transpile: 'no-transpile' + builder: 'vite' + env: 'built' + - compatibility: 'no-compatibility' + builder: 'vite' + env: 'built' + - resolve: 'no-resolve' + builder: 'webpack' steps: - uses: actions/checkout@v4 From 382c4ce5a3342e23c13429c4ccffa0a2c58cc498 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Thu, 14 Sep 2023 22:04:54 +0100 Subject: [PATCH 09/24] ci: try excluding instead --- .github/workflows/ci.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 29851ee0..77549e63 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -73,19 +73,19 @@ jobs: os: [ubuntu-latest, windows-latest] node: [18] env: ['dev', 'built'] - transpile: ['transpile'] - compatibility: ['compatibility'] - resolve: ['resolve'] builder: ['vite', 'webpack'] - include: - - transpile: 'no-transpile' + transpile: ['transpile', 'no-transpile'] + compatibility: ['compatibility', 'no-compatibility'] + resolve: ['resolve', 'no-resolve'] + exclude: + - transpile: 'no-resolve' builder: 'vite' - env: 'built' + - compatibility: 'no-compatibility' + env: 'dev' - compatibility: 'no-compatibility' builder: 'vite' - env: 'built' - resolve: 'no-resolve' - builder: 'webpack' + builder: 'vite' steps: - uses: actions/checkout@v4 From a5c3f8a1fa6404d0107b74872fb26a1c1814a870 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Thu, 14 Sep 2023 22:07:36 +0100 Subject: [PATCH 10/24] ci: exclude more and add concurrency rule --- .github/workflows/ci.yml | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 77549e63..bed9e044 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,6 +8,20 @@ on: branches: - main +# https://github.com/vitejs/vite/blob/main/.github/workflows/ci.yml +env: + # 7 GiB by default on GitHub, setting to 6 GiB + # https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources + NODE_OPTIONS: --max-old-space-size=6144 + +# Remove default permissions of GITHUB_TOKEN for security +# https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs +permissions: {} + +concurrency: + group: ${{ github.workflow }}-${{ github.event.number || github.sha }} + cancel-in-progress: ${{ github.event_name != 'push' }} + jobs: build: runs-on: ${{ matrix.os }} @@ -80,12 +94,14 @@ jobs: exclude: - transpile: 'no-resolve' builder: 'vite' + - transpile: 'no-resolve' + builder: 'dev' - compatibility: 'no-compatibility' env: 'dev' - compatibility: 'no-compatibility' builder: 'vite' - - resolve: 'no-resolve' - builder: 'vite' + - transpile: 'no-transpile' + builder: 'webpack' steps: - uses: actions/checkout@v4 @@ -101,7 +117,6 @@ jobs: - name: Test (fixtures) run: pnpm test:fixtures env: - NODE_OPTIONS: --max-old-space-size=8192 TEST_ENV: ${{ matrix.env }} TEST_BUILDER: ${{ matrix.builder }} TEST_TRANSPILE: ${{ matrix.transpile }} From 25279cccafbe0fea8e253a1af6a2aa403be64ad5 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Thu, 14 Sep 2023 22:11:42 +0100 Subject: [PATCH 11/24] ci: revert back to include and try --- .github/workflows/ci.yml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bed9e044..a908dfe4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -88,20 +88,19 @@ jobs: node: [18] env: ['dev', 'built'] builder: ['vite', 'webpack'] - transpile: ['transpile', 'no-transpile'] - compatibility: ['compatibility', 'no-compatibility'] - resolve: ['resolve', 'no-resolve'] - exclude: + transpile: ['transpile'] + compatibility: ['compatibility'] + resolve: ['resolve'] + include: - transpile: 'no-resolve' - builder: 'vite' - - transpile: 'no-resolve' - builder: 'dev' - - compatibility: 'no-compatibility' - env: 'dev' + builder: 'webpack' + env: 'built' - compatibility: 'no-compatibility' builder: 'vite' + env: 'built' - transpile: 'no-transpile' builder: 'webpack' + env: 'built' steps: - uses: actions/checkout@v4 From 717b1c0c19b12ef47adab7ed0b7415cac8903752 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Thu, 14 Sep 2023 22:14:30 +0100 Subject: [PATCH 12/24] chore: debug --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a908dfe4..61ef2559 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,6 +13,7 @@ env: # 7 GiB by default on GitHub, setting to 6 GiB # https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources NODE_OPTIONS: --max-old-space-size=6144 + ACTIONS_STEP_DEBUG: true # Remove default permissions of GITHUB_TOKEN for security # https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs From b7a463e28389450b90e321144ce3c7bf44a13bc3 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Thu, 14 Sep 2023 22:27:20 +0100 Subject: [PATCH 13/24] ci: try more explicitly --- .github/workflows/ci.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 61ef2559..118edd1f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,6 @@ env: # 7 GiB by default on GitHub, setting to 6 GiB # https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources NODE_OPTIONS: --max-old-space-size=6144 - ACTIONS_STEP_DEBUG: true # Remove default permissions of GITHUB_TOKEN for security # https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs @@ -89,16 +88,22 @@ jobs: node: [18] env: ['dev', 'built'] builder: ['vite', 'webpack'] - transpile: ['transpile'] - compatibility: ['compatibility'] - resolve: ['resolve'] include: + - transpile: 'resolve' + builder: 'webpack' + env: 'built' - transpile: 'no-resolve' builder: 'webpack' env: 'built' + - compatibility: 'compatibility' + builder: 'vite' + env: 'built' - compatibility: 'no-compatibility' builder: 'vite' env: 'built' + - transpile: 'transpile' + builder: 'webpack' + env: 'built' - transpile: 'no-transpile' builder: 'webpack' env: 'built' From 213af7c3046df971171ea60ea3c6bdc57cd0b0eb Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Thu, 14 Sep 2023 22:28:28 +0100 Subject: [PATCH 14/24] chore: add back options --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 118edd1f..1a0a45e6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -88,6 +88,9 @@ jobs: node: [18] env: ['dev', 'built'] builder: ['vite', 'webpack'] + transpile: ['transpile'] + compatibility: ['compatibility'] + resolve: ['resolve'] include: - transpile: 'resolve' builder: 'webpack' From a806dcec5a7bcd38de468cae59c715196168b5b3 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Thu, 14 Sep 2023 22:33:05 +0100 Subject: [PATCH 15/24] ci: try removing exclude --- .github/workflows/ci.yml | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1a0a45e6..87c3a2e4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -91,25 +91,6 @@ jobs: transpile: ['transpile'] compatibility: ['compatibility'] resolve: ['resolve'] - include: - - transpile: 'resolve' - builder: 'webpack' - env: 'built' - - transpile: 'no-resolve' - builder: 'webpack' - env: 'built' - - compatibility: 'compatibility' - builder: 'vite' - env: 'built' - - compatibility: 'no-compatibility' - builder: 'vite' - env: 'built' - - transpile: 'transpile' - builder: 'webpack' - env: 'built' - - transpile: 'no-transpile' - builder: 'webpack' - env: 'built' steps: - uses: actions/checkout@v4 From cf63e4c086b6fb91fa34a5e7efa7e282162f2970 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Thu, 14 Sep 2023 22:34:08 +0100 Subject: [PATCH 16/24] ci: add additional case --- .github/workflows/ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 87c3a2e4..4dedcbfd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -91,6 +91,10 @@ jobs: transpile: ['transpile'] compatibility: ['compatibility'] resolve: ['resolve'] + include: + - transpile: 'no-transpile' + builder: 'webpack' + env: 'built' steps: - uses: actions/checkout@v4 From e21ea2c94839e69cdff96e508c2132eadcc382d9 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Thu, 14 Sep 2023 22:35:21 +0100 Subject: [PATCH 17/24] ci: simplify further --- .github/workflows/ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4dedcbfd..a6788af4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -93,8 +93,6 @@ jobs: resolve: ['resolve'] include: - transpile: 'no-transpile' - builder: 'webpack' - env: 'built' steps: - uses: actions/checkout@v4 From e4b815eae6490ded9628ff8b12c9c6fc91871c17 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Thu, 14 Sep 2023 22:38:19 +0100 Subject: [PATCH 18/24] ci: remove other matrices --- .github/workflows/ci.yml | 34 +++++++++------------------------- 1 file changed, 9 insertions(+), 25 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a6788af4..8ad6b01c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,19 +24,14 @@ concurrency: jobs: build: - runs-on: ${{ matrix.os }} - - strategy: - matrix: - os: [ubuntu-latest] - node: [18] + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - run: corepack enable - uses: actions/setup-node@v3 with: - node-version: ${{ matrix.node }} + node-version: 18 cache: "pnpm" - name: Install dependencies @@ -52,22 +47,17 @@ jobs: uses: actions/cache@v3 with: path: packages/*/dist - key: ${{ matrix.os }}-node-v${{ matrix.node }}-${{ github.sha }} + key: ubuntu-latest-node-v18-${{ github.sha }} lint: - runs-on: ${{ matrix.os }} - - strategy: - matrix: - os: [ubuntu-latest] - node: [20] + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - run: corepack enable - uses: actions/setup-node@v3 with: - node-version: ${{ matrix.node }} + node-version: 20 cache: "pnpm" - name: Install dependencies @@ -120,14 +110,13 @@ jobs: strategy: matrix: os: [ubuntu-latest, windows-latest] - node: [18] steps: - uses: actions/checkout@v4 - run: corepack enable - uses: actions/setup-node@v3 with: - node-version: ${{ matrix.node }} + node-version: 18 cache: "pnpm" - name: Install dependencies @@ -149,19 +138,14 @@ jobs: - build - test-fixtures - test-unit - runs-on: ${{ matrix.os }} - - strategy: - matrix: - os: [ubuntu-latest] - node: [18] + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - run: corepack enable - uses: actions/setup-node@v3 with: - node-version: ${{ matrix.node }} + node-version: 18 cache: "pnpm" - name: Install dependencies @@ -171,7 +155,7 @@ jobs: uses: actions/cache@v3 with: path: packages/*/dist - key: ${{ matrix.os }}-node-v${{ matrix.node }}-${{ github.sha }} + key: ubuntu-latest-node-v18-${{ github.sha }} - name: Release Edge run: ./scripts/release-edge.sh From 3ce4fdaa4cfd2989a53d56ead907b8f2a672fe79 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Thu, 14 Sep 2023 22:39:01 +0100 Subject: [PATCH 19/24] chore: remove node matrix --- .github/workflows/ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8ad6b01c..99f40a3a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -75,7 +75,6 @@ jobs: strategy: matrix: os: [ubuntu-latest, windows-latest] - node: [18] env: ['dev', 'built'] builder: ['vite', 'webpack'] transpile: ['transpile'] @@ -89,7 +88,7 @@ jobs: - run: corepack enable - uses: actions/setup-node@v3 with: - node-version: ${{ matrix.node }} + node-version: 18 cache: "pnpm" - name: Install dependencies From 54bfa1cc4fe9de95468b87f75765d937ec59fd32 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Thu, 14 Sep 2023 22:41:07 +0100 Subject: [PATCH 20/24] ci: disable transpile --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 99f40a3a..2ec55272 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -77,7 +77,7 @@ jobs: os: [ubuntu-latest, windows-latest] env: ['dev', 'built'] builder: ['vite', 'webpack'] - transpile: ['transpile'] + # transpile: ['transpile'] compatibility: ['compatibility'] resolve: ['resolve'] include: From 9e73face1c462ff6d32774e782c3c6f5eccde30d Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Thu, 14 Sep 2023 22:42:14 +0100 Subject: [PATCH 21/24] ci: try adding --- .github/workflows/ci.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2ec55272..d48feb55 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -82,6 +82,11 @@ jobs: resolve: ['resolve'] include: - transpile: 'no-transpile' + builder: 'webpack' + env: 'built' + - transpile: 'transpile' + builder: 'webpack' + env: 'built' steps: - uses: actions/checkout@v4 @@ -99,7 +104,7 @@ jobs: env: TEST_ENV: ${{ matrix.env }} TEST_BUILDER: ${{ matrix.builder }} - TEST_TRANSPILE: ${{ matrix.transpile }} + TEST_TRANSPILE: ${{ matrix.transpile || 'transpile' }} TEST_COMPATIBILITY: ${{ matrix.compatibility }} TEST_RESOLVE: ${{ matrix.resolve }} From 3d47b10a6c1eee0ab78d03279f82da5c10455ad2 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Thu, 14 Sep 2023 22:50:16 +0100 Subject: [PATCH 22/24] ci: retry --- .github/workflows/ci.yml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d48feb55..9f1898d5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -77,16 +77,12 @@ jobs: os: [ubuntu-latest, windows-latest] env: ['dev', 'built'] builder: ['vite', 'webpack'] - # transpile: ['transpile'] + transpile: ['transpile', 'no-transpile'] compatibility: ['compatibility'] resolve: ['resolve'] - include: + exclude: - transpile: 'no-transpile' - builder: 'webpack' - env: 'built' - - transpile: 'transpile' - builder: 'webpack' - env: 'built' + builder: 'vite' steps: - uses: actions/checkout@v4 @@ -105,8 +101,8 @@ jobs: TEST_ENV: ${{ matrix.env }} TEST_BUILDER: ${{ matrix.builder }} TEST_TRANSPILE: ${{ matrix.transpile || 'transpile' }} - TEST_COMPATIBILITY: ${{ matrix.compatibility }} - TEST_RESOLVE: ${{ matrix.resolve }} + TEST_COMPATIBILITY: ${{ matrix.compatibility || 'compatibility' }} + TEST_RESOLVE: ${{ matrix.resolve || 'resolve' }} test-unit: runs-on: ${{ matrix.os }} From 5a107df6628b5266d70e775e8c7f85498fed4ee7 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Thu, 14 Sep 2023 22:52:37 +0100 Subject: [PATCH 23/24] ci: add more --- .github/workflows/ci.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9f1898d5..476503b1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -78,11 +78,17 @@ jobs: env: ['dev', 'built'] builder: ['vite', 'webpack'] transpile: ['transpile', 'no-transpile'] - compatibility: ['compatibility'] - resolve: ['resolve'] + compatibility: ['compatibility', 'no-compatibility'] + resolve: ['resolve', 'no-resolve'] exclude: - transpile: 'no-transpile' builder: 'vite' + - transpile: 'no-compatibility' + builder: 'vite' + - transpile: 'no-resolve' + builder: 'vite' + - transpile: 'no-compatibility' + env: 'dev' steps: - uses: actions/checkout@v4 From 308da5071f597605778b17f2457fd892ca54a784 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Thu, 14 Sep 2023 22:54:08 +0100 Subject: [PATCH 24/24] ci: fix keys --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 476503b1..4215d27b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -83,11 +83,11 @@ jobs: exclude: - transpile: 'no-transpile' builder: 'vite' - - transpile: 'no-compatibility' + - compatibility: 'no-compatibility' builder: 'vite' - - transpile: 'no-resolve' + - resolve: 'no-resolve' builder: 'vite' - - transpile: 'no-compatibility' + - compatibility: 'no-compatibility' env: 'dev' steps: