From 250c75323f4deb063021d32d70898b9582343f5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?MJ=E2=98=94?= Date: Fri, 10 Nov 2023 14:34:50 -0800 Subject: [PATCH 01/10] feat: setup GH workflow for create amplify --- .github/workflows/poc-e2e-flow-test.yml | 82 ++++---- .../src/npm_package_manager_controller.ts | 7 +- .../src/tsconfig_initializer.ts | 7 +- .../src/test-e2e/create_amplify.test.ts | 195 ++++++++++++++++-- 4 files changed, 230 insertions(+), 61 deletions(-) diff --git a/.github/workflows/poc-e2e-flow-test.yml b/.github/workflows/poc-e2e-flow-test.yml index 9f1870dc93..3061036ab9 100644 --- a/.github/workflows/poc-e2e-flow-test.yml +++ b/.github/workflows/poc-e2e-flow-test.yml @@ -5,53 +5,59 @@ name: 'poc-e2e-flow-test' on: # TODO: need to change the trigger push: branches: - - poc/e2e-test + - poc/e2e-create-amplify jobs: - create-amplify-project: + install: strategy: + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + runs-on: ${{ matrix.os }} + steps: + - name: Checkout aws-amplify/amplify-cli repo + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - name: Setup Node.js + uses: ./.github/actions/setup_node + - name: Install or Restore Cache + uses: ./.github/actions/install_with_cache + build: + runs-on: ubuntu-latest + needs: + - install + steps: + - name: Checkout aws-amplify/amplify-cli repo + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - name: Setup Node.js + uses: ./.github/actions/setup_node + - name: Build or Restore Build Cache + uses: ./.github/actions/build_with_cache + run_e2e_tests: + strategy: + # will finish running other test matrices even if one fails fail-fast: false matrix: - os: [ubuntu-latest, windows-latest, macOS-latest] - node-version: [18] + os: [ubuntu-latest, macos-latest, windows-latest] pkg-manager: [npm, yarn, yarn-stable, pnpm] - runs-on: ${{ matrix.os }} env: - PACKAGE_MANAGER_EXECUTABLE: ${{ matrix.pkg-manager }} # TODO: remove PACKAGE_MANAGER_EXECUTABLE once CLI is able to getPackageManager(). + ACKAGE_MANAGER_EXECUTABLE: ${{ matrix.pkg-manager }} # TODO: remove PACKAGE_MANAGER_EXECUTABLE once CLI is able to getPackageManager(). + runs-on: ${{ matrix.os }} + timeout-minutes: 60 + needs: + - build + permissions: + # these permissions are required for the configure-aws-credentials action to get a JWT from GitHub + id-token: write + contents: read steps: - name: Checkout aws-amplify/amplify-cli repo - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1. TODO: try only fetch .github/workflow + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Setup Node.js - uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 #4.0.0 + uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # version 3.8.1 with: - node-version: ${{ matrix.node-version }} - cache: npm - - name: Local Publish create-amplify - shell: bash - run: npm run install:local && npm run build && npm run vend - - name: ${{matrix.pkg-manager}}-create-amplify-project - if: matrix.pkg-manager != 'yarn-stable' - shell: bash - run: - | # TODO: last step `create amplify` should be replaced by `run e2e` - mkdir -p /tmp/amplify-project; cd /tmp/amplify-project - npm install -g ${{matrix.pkg-manager}} - echo "$(${{matrix.pkg-manager}}) config set registry http://localhost:4873" - ${{matrix.pkg-manager}} config set registry http://localhost:4873 - echo "$(${{matrix.pkg-manager}}) config get registry" - ${{matrix.pkg-manager}} config get registry - ${{matrix.pkg-manager}} create amplify --yes - - - name: yarn-stable-create-amplify-project - if: matrix.pkg-manager == 'yarn-stable' + node-version: 19 + - name: Restore Build Cache + uses: ./.github/actions/restore_build_cache + - name: Run E2E tests with ${{ matrix.pkg-manager }} shell: bash - run: - | # TODO: last step `create amplify` should be replaced by `run e2e` - mkdir -p /tmp/amplify-project; cd /tmp/amplify-project - corepack enable - echo "yarn set version stable" - yarn set version stable - echo "yarn version $(yarn --version)" - yarn config set unsafeHttpWhitelist localhost - yarn config set npmRegistryServer http://localhost:4873 - PACKAGE_MANAGER_EXECUTABLE=yarn yarn create amplify --yes + run: | + PACKAGE_MANAGER_EXECUTABLE=${{matrix.pkg-manager}} npm run test:dir packages/integration-tests/src/test-e2e/create_amplify.test.ts diff --git a/packages/create-amplify/src/npm_package_manager_controller.ts b/packages/create-amplify/src/npm_package_manager_controller.ts index 65c98f0ab7..1419545788 100644 --- a/packages/create-amplify/src/npm_package_manager_controller.ts +++ b/packages/create-amplify/src/npm_package_manager_controller.ts @@ -15,8 +15,11 @@ export class NpmPackageManagerController implements PackageManagerController { private readonly projectRoot: string, private readonly execa = _execa ) {} - private readonly executableName = - process.env.PACKAGE_MANAGER_EXECUTABLE || 'npm'; // TODO: replace `process.env.PACKAGE_MANAGER_EXECUTABLE` with `getPackageManagerName()` once the test infra is ready. + private readonly executableName = !process.env.PACKAGE_MANAGER_EXECUTABLE + ? 'npm' + : process.env.PACKAGE_MANAGER_EXECUTABLE === 'yarn-stable' + ? 'yarn' + : process.env.PACKAGE_MANAGER_EXECUTABLE; // TODO: replace `process.env.PACKAGE_MANAGER_EXECUTABLE` with `getPackageManagerName()` once the test infra is ready. /** * Installs the given package names as devDependencies diff --git a/packages/create-amplify/src/tsconfig_initializer.ts b/packages/create-amplify/src/tsconfig_initializer.ts index 0ad229653d..e6b1113adf 100644 --- a/packages/create-amplify/src/tsconfig_initializer.ts +++ b/packages/create-amplify/src/tsconfig_initializer.ts @@ -17,8 +17,11 @@ export class TsConfigInitializer { private readonly existsSync = _existsSync, private readonly execa = _execa ) {} - private readonly executableName = - process.env.PACKAGE_MANAGER_EXECUTABLE || 'npx'; // TODO: replace `process.env.PACKAGE_MANAGER_EXECUTABLE` with `getPackageManagerName()` once the test infra is ready. + private readonly executableName = !process.env.PACKAGE_MANAGER_EXECUTABLE + ? 'npx' + : process.env.PACKAGE_MANAGER_EXECUTABLE === 'yarn-stable' + ? 'yarn' + : process.env.PACKAGE_MANAGER_EXECUTABLE; // TODO: replace `process.env.PACKAGE_MANAGER_EXECUTABLE` with `getPackageManagerName()` once the test infra is ready. /** * If tsconfig.json already exists, this is a noop. Otherwise, `npx tsc --init` is executed to create a tsconfig.json file diff --git a/packages/integration-tests/src/test-e2e/create_amplify.test.ts b/packages/integration-tests/src/test-e2e/create_amplify.test.ts index e21648a331..f647c74f2d 100644 --- a/packages/integration-tests/src/test-e2e/create_amplify.test.ts +++ b/packages/integration-tests/src/test-e2e/create_amplify.test.ts @@ -7,19 +7,93 @@ import { after, afterEach, before, beforeEach, describe, it } from 'node:test'; import assert from 'assert'; import { glob } from 'glob'; -void describe('create-amplify script', () => { - before(async () => { - // start a local npm proxy and publish the current codebase to the proxy - await execa('npm', ['run', 'clean:npm-proxy'], { stdio: 'inherit' }); - await execa('npm', ['run', 'vend'], { stdio: 'inherit' }); +type PackageManagerExecutable = 'npm' | 'yarn' | 'yarn-stable' | 'pnpm'; - // nuke the npx cache to ensure we are installing packages from the npm proxy +const packageManagerSetup = async ( + packageManagerExecutable: PackageManagerExecutable, + dir: string +) => { + if (packageManagerExecutable === 'npm') { const { stdout } = await execa('npm', ['config', 'get', 'cache']); const npxCacheLocation = path.join(stdout.toString().trim(), '_npx'); if (existsSync(npxCacheLocation)) { await fs.rm(npxCacheLocation, { recursive: true }); } + } else if (packageManagerExecutable.startsWith('yarn')) { + if (packageManagerExecutable === 'yarn-stable') { + await execa('yarn', ['add', 'tsx'], { + cwd: dir, + stdio: 'inherit', + }); + await execa('yarn', ['set', 'version', 'stable'], { + cwd: dir, + stdio: 'inherit', + }); + + await execa( + 'yarn', + ['config', 'set', 'npmRegistryServer', 'http://localhost:4873'], + { cwd: dir, stdio: 'inherit' } + ); + await execa( + 'yarn', + ['config', 'set', 'unsafeHttpWhitelist', 'localhost'], + { + cwd: dir, + stdio: 'inherit', + } + ); + } else { + await execa( + packageManagerExecutable, + ['config', 'set', 'registry', 'http://localhost:4873'], + { cwd: dir, stdio: 'inherit' } + ); + await execa(packageManagerExecutable, ['config', 'get', 'registry'], { + cwd: dir, + stdio: 'inherit', + }); + } + await execa( + packageManagerExecutable === 'yarn-stable' + ? 'yarn' + : packageManagerExecutable, + ['cache', 'clean'] + ); + } else if (packageManagerExecutable === 'pnpm') { + await execa(packageManagerExecutable, ['--version'], { + stdio: 'inherit', + }); + await execa( + packageManagerExecutable, + ['config', 'set', 'registry', 'http://localhost:4873'], + + { stdio: 'inherit' } + ); + await execa(packageManagerExecutable, ['config', 'get', 'registry'], { + stdio: 'inherit', + }); + + await execa(packageManagerExecutable, ['store', 'clear']); + } +}; + +void describe('create-amplify script', () => { + const { PACKAGE_MANAGER_EXECUTABLE = 'npm' } = process.env; + + before(async () => { + // start a local npm proxy and publish the current codebase to the proxy + await execa('npm', ['run', 'clean:npm-proxy'], { stdio: 'inherit' }); + await execa('npm', ['run', 'vend'], { stdio: 'inherit' }); + + if (PACKAGE_MANAGER_EXECUTABLE.startsWith('yarn')) { + await execa('npm', ['install', '-g', 'yarn'], { stdio: 'inherit' }); + } else if (PACKAGE_MANAGER_EXECUTABLE === 'pnpm') { + await execa('npm', ['install', '-g', PACKAGE_MANAGER_EXECUTABLE], { + stdio: 'inherit', + }); + } }); after(async () => { @@ -28,8 +102,30 @@ void describe('create-amplify script', () => { }); let tempDir: string; + beforeEach(async () => { - tempDir = await fs.mkdtemp(path.join(os.tmpdir(), 'test-create-amplify')); + const tempDirPath = await fs.mkdtemp( + path.join(os.tmpdir(), 'test-create-amplify') + ); + tempDir = path.join(tempDirPath); + + const { stdout } = await execa( + PACKAGE_MANAGER_EXECUTABLE === 'yarn-stable' + ? 'yarn' + : PACKAGE_MANAGER_EXECUTABLE, + ['--version'], + { + cwd: tempDir, + } + ); + + console.log(`Using ${PACKAGE_MANAGER_EXECUTABLE} version ${stdout}`); + + // nuke the npx cache to ensure we are installing packages from the npm proxy + await packageManagerSetup( + PACKAGE_MANAGER_EXECUTABLE as PackageManagerExecutable, + tempDir + ); }); afterEach(async () => { @@ -55,10 +151,17 @@ void describe('create-amplify script', () => { ); } - await execa('npm', ['create', 'amplify', '--yes'], { - cwd: tempDir, - stdio: 'inherit', - }); + await execa( + PACKAGE_MANAGER_EXECUTABLE === 'yarn-stable' + ? 'yarn' + : PACKAGE_MANAGER_EXECUTABLE, + ['create', 'amplify', '--yes'], + { + cwd: tempDir, + stdio: 'inherit', + } + ); + const packageJsonPath = path.resolve(tempDir, 'package.json'); const packageJsonObject = JSON.parse( await fs.readFile(packageJsonPath, 'utf-8') @@ -121,7 +224,11 @@ void describe('create-amplify script', () => { // assert that project compiles successfully await execa( - 'npx', + PACKAGE_MANAGER_EXECUTABLE === 'npm' + ? 'npx' + : PACKAGE_MANAGER_EXECUTABLE === 'yarn-stable' + ? 'yarn' + : PACKAGE_MANAGER_EXECUTABLE, [ 'tsc', '--noEmit', @@ -140,9 +247,49 @@ void describe('create-amplify script', () => { } ); + if (PACKAGE_MANAGER_EXECUTABLE.startsWith('yarn')) { + await execa( + PACKAGE_MANAGER_EXECUTABLE === 'npm' + ? 'npx' + : PACKAGE_MANAGER_EXECUTABLE === 'yarn-stable' + ? 'yarn' + : PACKAGE_MANAGER_EXECUTABLE, + ['add', 'aws-cdk', 'aws-cdk-lib', 'constructs'], + { + cwd: tempDir, + stdio: 'inherit', + } + ); + if (PACKAGE_MANAGER_EXECUTABLE === 'yarn-stable') { + await execa( + 'yarn', + [ + 'add', + 'tsx', + 'graphql', + 'pluralize', + 'zod', + '@aws-amplify/platform-core', + ], + { + cwd: tempDir, + stdio: 'inherit', + } + ); + + await execa('node', ['--version'], { + cwd: tempDir, + }); + } + } + // assert that project synthesizes successfully await execa( - 'npx', + PACKAGE_MANAGER_EXECUTABLE === 'npm' + ? 'npx' + : PACKAGE_MANAGER_EXECUTABLE === 'yarn-stable' + ? 'yarn' + : PACKAGE_MANAGER_EXECUTABLE, [ 'cdk', 'synth', @@ -153,7 +300,13 @@ void describe('create-amplify script', () => { '--context', `amplify-backend-type=sandbox`, '--app', - "'npx tsx amplify/backend.ts'", + `'${ + PACKAGE_MANAGER_EXECUTABLE === 'npm' + ? 'npx' + : PACKAGE_MANAGER_EXECUTABLE === 'yarn-stable' + ? 'yarn' + : PACKAGE_MANAGER_EXECUTABLE + } tsx amplify/backend.ts'`, '--quiet', ], { @@ -168,11 +321,15 @@ void describe('create-amplify script', () => { const amplifyDirPath = path.join(tempDir, 'amplify'); await fs.mkdir(amplifyDirPath, { recursive: true }); - const result = await execa('npm', ['create', 'amplify', '--yes'], { - cwd: tempDir, - stdio: 'pipe', - reject: false, - }); + const result = await execa( + PACKAGE_MANAGER_EXECUTABLE, + ['create', 'amplify', '--yes'], + { + cwd: tempDir, + stdio: 'pipe', + reject: false, + } + ); assert.equal(result.exitCode, 1); assert.ok( result.stderr From 23e320a91e075f840c1e11784db0b5952b7168a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?MJ=E2=98=94?= Date: Fri, 10 Nov 2023 15:33:36 -0800 Subject: [PATCH 02/10] chore: changeset --- .changeset/small-readers-check.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .changeset/small-readers-check.md diff --git a/.changeset/small-readers-check.md b/.changeset/small-readers-check.md new file mode 100644 index 0000000000..7d3dc29612 --- /dev/null +++ b/.changeset/small-readers-check.md @@ -0,0 +1,7 @@ +--- +'@aws-amplify/integration-tests': patch +'create-amplify': patch +--- + +- Support yarn, pnpm via env var +- Add e2e test against yarn, pnpm From fcc7e5435de25682b45abdd18d6c5344e74fc5ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?MJ=E2=98=94?= Date: Fri, 10 Nov 2023 20:38:57 -0800 Subject: [PATCH 03/10] fix: add pkg type for modern yarn --- .../src/test-e2e/create_amplify.test.ts | 61 +++++++++---------- 1 file changed, 29 insertions(+), 32 deletions(-) diff --git a/packages/integration-tests/src/test-e2e/create_amplify.test.ts b/packages/integration-tests/src/test-e2e/create_amplify.test.ts index f647c74f2d..3f18df0795 100644 --- a/packages/integration-tests/src/test-e2e/create_amplify.test.ts +++ b/packages/integration-tests/src/test-e2e/create_amplify.test.ts @@ -13,6 +13,11 @@ const packageManagerSetup = async ( packageManagerExecutable: PackageManagerExecutable, dir: string ) => { + const execaOptions = { + cwd: dir, + stdio: 'inherit' as const, + }; + if (packageManagerExecutable === 'npm') { const { stdout } = await execa('npm', ['config', 'get', 'cache']); const npxCacheLocation = path.join(stdout.toString().trim(), '_npx'); @@ -22,58 +27,47 @@ const packageManagerSetup = async ( } } else if (packageManagerExecutable.startsWith('yarn')) { if (packageManagerExecutable === 'yarn-stable') { - await execa('yarn', ['add', 'tsx'], { - cwd: dir, - stdio: 'inherit', - }); - await execa('yarn', ['set', 'version', 'stable'], { - cwd: dir, - stdio: 'inherit', - }); + await execa('yarn', ['set', 'version', 'stable'], execaOptions); + await execa('npm', ['pkg', 'set', 'type=module'], execaOptions); // `npm pkg set type="module"` only run when package.json does not exist, so we need to run it manually here await execa( 'yarn', ['config', 'set', 'npmRegistryServer', 'http://localhost:4873'], - { cwd: dir, stdio: 'inherit' } + execaOptions ); await execa( 'yarn', ['config', 'set', 'unsafeHttpWhitelist', 'localhost'], - { - cwd: dir, - stdio: 'inherit', - } + execaOptions ); } else { await execa( packageManagerExecutable, ['config', 'set', 'registry', 'http://localhost:4873'], - { cwd: dir, stdio: 'inherit' } + execaOptions + ); + await execa( + packageManagerExecutable, + ['config', 'get', 'registry'], + execaOptions ); - await execa(packageManagerExecutable, ['config', 'get', 'registry'], { - cwd: dir, - stdio: 'inherit', - }); } await execa( packageManagerExecutable === 'yarn-stable' ? 'yarn' : packageManagerExecutable, - ['cache', 'clean'] + ['cache', 'clean'], + execaOptions ); } else if (packageManagerExecutable === 'pnpm') { - await execa(packageManagerExecutable, ['--version'], { - stdio: 'inherit', - }); - await execa( - packageManagerExecutable, - ['config', 'set', 'registry', 'http://localhost:4873'], - - { stdio: 'inherit' } - ); - await execa(packageManagerExecutable, ['config', 'get', 'registry'], { - stdio: 'inherit', - }); + await execa(packageManagerExecutable, ['--version']); + await execa(packageManagerExecutable, [ + 'config', + 'set', + 'registry', + 'http://localhost:4873', + ]); + await execa(packageManagerExecutable, ['config', 'get', 'registry']); await execa(packageManagerExecutable, ['store', 'clear']); } @@ -265,6 +259,7 @@ void describe('create-amplify script', () => { 'yarn', [ 'add', + '-D', 'tsx', 'graphql', 'pluralize', @@ -322,7 +317,9 @@ void describe('create-amplify script', () => { await fs.mkdir(amplifyDirPath, { recursive: true }); const result = await execa( - PACKAGE_MANAGER_EXECUTABLE, + PACKAGE_MANAGER_EXECUTABLE === 'yarn-stable' + ? 'yarn' + : PACKAGE_MANAGER_EXECUTABLE, ['create', 'amplify', '--yes'], { cwd: tempDir, From 827a51a835b23c04b5c561415fd34b5362ac7016 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?MJ=E2=98=94?= Date: Sun, 12 Nov 2023 22:40:19 -0800 Subject: [PATCH 04/10] fix npm install --- .../src/npm_package_manager_controller.ts | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/packages/create-amplify/src/npm_package_manager_controller.ts b/packages/create-amplify/src/npm_package_manager_controller.ts index e30ef65508..546c581de4 100644 --- a/packages/create-amplify/src/npm_package_manager_controller.ts +++ b/packages/create-amplify/src/npm_package_manager_controller.ts @@ -37,9 +37,18 @@ export class NpmPackageManagerController implements PackageManagerController { } try { - await executeWithDebugLogger(this.projectRoot, 'npm', args, this.execa); + await executeWithDebugLogger( + this.projectRoot, + this.executableName, + args, + this.execa + ); } catch { - throw new Error(`\`npm ${args.join(' ')}\` did not exit successfully.`); + throw new Error( + `\`${this.executableName} ${args.join( + ' ' + )}\` did not exit successfully.` + ); } }; } From 52ba97a641ce41b4b7498023a9ba91387bd8bce8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?MJ=E2=98=94?= Date: Mon, 13 Nov 2023 11:32:48 -0800 Subject: [PATCH 05/10] feat: test Node v20 and Node v19 --- .github/workflows/poc-e2e-flow-test.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/poc-e2e-flow-test.yml b/.github/workflows/poc-e2e-flow-test.yml index 3061036ab9..fb07db05ad 100644 --- a/.github/workflows/poc-e2e-flow-test.yml +++ b/.github/workflows/poc-e2e-flow-test.yml @@ -38,6 +38,13 @@ jobs: matrix: os: [ubuntu-latest, macos-latest, windows-latest] pkg-manager: [npm, yarn, yarn-stable, pnpm] + node-version: [20] + exclude: + - pkg-manager: yarn-stable + node-version: 20 + include: + - pkg-manager: yarn-stable + node-version: 19 env: ACKAGE_MANAGER_EXECUTABLE: ${{ matrix.pkg-manager }} # TODO: remove PACKAGE_MANAGER_EXECUTABLE once CLI is able to getPackageManager(). runs-on: ${{ matrix.os }} @@ -54,7 +61,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # version 3.8.1 with: - node-version: 19 + node-version: ${{ matrix.node-version }} - name: Restore Build Cache uses: ./.github/actions/restore_build_cache - name: Run E2E tests with ${{ matrix.pkg-manager }} From 6e6fe30c874155a2afd123a8248b71204729d197 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?MJ=E2=98=94?= Date: Mon, 13 Nov 2023 11:39:35 -0800 Subject: [PATCH 06/10] feat: test Node v20 and yarn-stable with Node 19 --- .github/workflows/poc-e2e-flow-test.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/poc-e2e-flow-test.yml b/.github/workflows/poc-e2e-flow-test.yml index fb07db05ad..6c9e1f7641 100644 --- a/.github/workflows/poc-e2e-flow-test.yml +++ b/.github/workflows/poc-e2e-flow-test.yml @@ -37,11 +37,8 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, macos-latest, windows-latest] - pkg-manager: [npm, yarn, yarn-stable, pnpm] + pkg-manager: [npm, yarn, pnpm] node-version: [20] - exclude: - - pkg-manager: yarn-stable - node-version: 20 include: - pkg-manager: yarn-stable node-version: 19 From f82dfe1769dfe79a7f35e3d8a46ff37fcd6ff45a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?MJ=E2=98=94?= Date: Mon, 13 Nov 2023 11:46:21 -0800 Subject: [PATCH 07/10] feat: exclude yarn-stable --- .github/workflows/poc-e2e-flow-test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/poc-e2e-flow-test.yml b/.github/workflows/poc-e2e-flow-test.yml index 6c9e1f7641..928c347d52 100644 --- a/.github/workflows/poc-e2e-flow-test.yml +++ b/.github/workflows/poc-e2e-flow-test.yml @@ -39,9 +39,9 @@ jobs: os: [ubuntu-latest, macos-latest, windows-latest] pkg-manager: [npm, yarn, pnpm] node-version: [20] - include: - - pkg-manager: yarn-stable - node-version: 19 + # include: + # - pkg-manager: yarn-stable + # node-version: 19 env: ACKAGE_MANAGER_EXECUTABLE: ${{ matrix.pkg-manager }} # TODO: remove PACKAGE_MANAGER_EXECUTABLE once CLI is able to getPackageManager(). runs-on: ${{ matrix.os }} From 39b5811a933e4785aae5875f40caae9309ee430c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?MJ=E2=98=94?= Date: Mon, 13 Nov 2023 11:55:11 -0800 Subject: [PATCH 08/10] feat: include node 20 and exclude node 19 --- .github/workflows/poc-e2e-flow-test.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/poc-e2e-flow-test.yml b/.github/workflows/poc-e2e-flow-test.yml index 928c347d52..5da661f2b8 100644 --- a/.github/workflows/poc-e2e-flow-test.yml +++ b/.github/workflows/poc-e2e-flow-test.yml @@ -37,11 +37,14 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, macos-latest, windows-latest] - pkg-manager: [npm, yarn, pnpm] - node-version: [20] - # include: - # - pkg-manager: yarn-stable - # node-version: 19 + pkg-manager: [npm, yarn, yarn-stable, pnpm] + include: + - node-version: 20 + - pkg-manager: yarn-stable + node-version: 19 + exclude: + - pkg-manager: yarn-stable + node-version: 20 env: ACKAGE_MANAGER_EXECUTABLE: ${{ matrix.pkg-manager }} # TODO: remove PACKAGE_MANAGER_EXECUTABLE once CLI is able to getPackageManager(). runs-on: ${{ matrix.os }} From c0b304a3217be5dfa57a71d7ea5abc3dd77814a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?MJ=E2=98=94?= Date: Mon, 13 Nov 2023 12:38:47 -0800 Subject: [PATCH 09/10] feat: use node 20 for others, use node 19 for yarn-stable --- .github/workflows/poc-e2e-flow-test.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/poc-e2e-flow-test.yml b/.github/workflows/poc-e2e-flow-test.yml index 5da661f2b8..798368eb2c 100644 --- a/.github/workflows/poc-e2e-flow-test.yml +++ b/.github/workflows/poc-e2e-flow-test.yml @@ -37,14 +37,18 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, macos-latest, windows-latest] - pkg-manager: [npm, yarn, yarn-stable, pnpm] + pkg-manager: [npm, yarn, pnpm] + node-version: [20] include: - - node-version: 20 - - pkg-manager: yarn-stable + - os: ubuntu-latest + pkg-manager: yarn-stable + node-version: 19 + - os: macos-latest + pkg-manager: yarn-stable + node-version: 19 + - os: windows-latest + pkg-manager: yarn-stable node-version: 19 - exclude: - - pkg-manager: yarn-stable - node-version: 20 env: ACKAGE_MANAGER_EXECUTABLE: ${{ matrix.pkg-manager }} # TODO: remove PACKAGE_MANAGER_EXECUTABLE once CLI is able to getPackageManager(). runs-on: ${{ matrix.os }} From 065f589ae5a9546d4af9df6d1bc4d785c4a212ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?MJ=E2=98=94?= Date: Mon, 13 Nov 2023 13:53:14 -0800 Subject: [PATCH 10/10] chore: add TODO to use Node 20 --- .github/workflows/poc-e2e-flow-test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/poc-e2e-flow-test.yml b/.github/workflows/poc-e2e-flow-test.yml index 798368eb2c..63fd37e8ea 100644 --- a/.github/workflows/poc-e2e-flow-test.yml +++ b/.github/workflows/poc-e2e-flow-test.yml @@ -42,13 +42,13 @@ jobs: include: - os: ubuntu-latest pkg-manager: yarn-stable - node-version: 19 + node-version: 19 # TODO: use Node 20 once https://github.com/yarnpkg/berry/pull/5961 is released - os: macos-latest pkg-manager: yarn-stable - node-version: 19 + node-version: 19 # TODO: use Node 20 once https://github.com/yarnpkg/berry/pull/5961 is released - os: windows-latest pkg-manager: yarn-stable - node-version: 19 + node-version: 19 # TODO: use Node 20 once https://github.com/yarnpkg/berry/pull/5961 is released env: ACKAGE_MANAGER_EXECUTABLE: ${{ matrix.pkg-manager }} # TODO: remove PACKAGE_MANAGER_EXECUTABLE once CLI is able to getPackageManager(). runs-on: ${{ matrix.os }}