From 6fbca326fdc2a232d81cfc3fd1fab33a832411e8 Mon Sep 17 00:00:00 2001 From: Louis Bompart Date: Fri, 28 Apr 2023 11:24:38 -0400 Subject: [PATCH] node20 --- .github/actions/e2e-run/action.yml | 4 ++-- .github/workflows/build.yml | 3 ++- scripts/cleaning/delete-api-keys.js | 8 ++------ scripts/cleaning/delete-orgs.js | 7 ++----- 4 files changed, 8 insertions(+), 14 deletions(-) diff --git a/.github/actions/e2e-run/action.yml b/.github/actions/e2e-run/action.yml index 7f045d9c7d..662d5ec9f7 100644 --- a/.github/actions/e2e-run/action.yml +++ b/.github/actions/e2e-run/action.yml @@ -35,7 +35,7 @@ runs: - uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3 with: cache: 'npm' - node-version-file: '.nvmrc' + node-version: ${{inputs.node}} - uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # v4 with: cache: 'pip' @@ -75,5 +75,5 @@ runs: - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3 if: cancelled() || failure() || success() with: - name: ${{inputs.os}}-${{inputs.spec}}-test-artifacts + name: ${{inputs.os}}-${{inputs.node}}-${{inputs.spec}}-test-artifacts path: ./packages/cli-e2e/artifacts diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index caf878453f..cf999f23c8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -134,6 +134,7 @@ jobs: fail-fast: false matrix: os: ['ubuntu-20.04', 'windows-latest'] + node: ['18', '20'] spec: [ 'angular.specs.ts', @@ -151,7 +152,7 @@ jobs: spec: auth.specs.ci.ts env: # ID of the test run to identify resources to teardown. - TEST_RUN_ID: 'id${{ matrix.os }}-${{ github.sha }}-${{ github.run_attempt }}g' + TEST_RUN_ID: 'id${{ matrix.os }}-${{ matrix.node }}-${{ github.sha }}-${{ github.run_attempt }}g' COVEO_DISABLE_AUTOUPDATE: true CLI_CONFIG_JSON: ${{needs.e2e-setup-login.outputs.cliConfigJson}} steps: diff --git a/scripts/cleaning/delete-api-keys.js b/scripts/cleaning/delete-api-keys.js index bcadb5ea0f..9df0c4b69e 100644 --- a/scripts/cleaning/delete-api-keys.js +++ b/scripts/cleaning/delete-api-keys.js @@ -1,6 +1,3 @@ -require('isomorphic-fetch'); -require('abortcontroller-polyfill'); - const {homedir} = require('os'); const {join} = require('path'); const {config} = require('dotenv'); @@ -9,9 +6,8 @@ config({path: join(homedir(), '.env')}); function wasCreatedByTheCli(testRunId = '') { return (key) => - (key.displayName?.startsWith(`cli-idwindows-latest-${testRunId}`) || - key.displayName?.startsWith(`cli-idubuntu-20-04-${testRunId}`) || - key.displayName?.startsWith(`cli-id${testRunId}`)) && + key.displayName?.startsWith('cli-id') && + key.displayName?.includes(testRunId) && key.description === 'Generated by the Coveo CLI'; } diff --git a/scripts/cleaning/delete-orgs.js b/scripts/cleaning/delete-orgs.js index a18f1ffbf7..a0ce7fe9ac 100644 --- a/scripts/cleaning/delete-orgs.js +++ b/scripts/cleaning/delete-orgs.js @@ -1,6 +1,3 @@ -require('isomorphic-fetch'); -require('abortcontroller-polyfill'); - const {homedir} = require('os'); const {join} = require('path'); const {config} = require('dotenv'); @@ -15,8 +12,8 @@ config({path: join(homedir(), '.env')}); function wasCreatedByTheCli(testRunId = '') { return (key) => testRunId - ? key.displayName?.startsWith(`cli-e2e-idwindows-latest-${testRunId}`) || - key.displayName?.startsWith(`cli-e2e-idubuntu-20-04-${testRunId}`) + ? key.displayName?.startsWith('cli-e2e-id') && + key.displayName?.includes(testRunId) : key.displayName?.match(/cli-e2e.*g/); }