diff --git a/.github/actions/e2e-run/action.yml b/.github/actions/e2e-run/action.yml index c523e8c4b3..7693414dde 100644 --- a/.github/actions/e2e-run/action.yml +++ b/.github/actions/e2e-run/action.yml @@ -36,7 +36,7 @@ runs: run: | git config --global core.autocrlf false git config --global core.eol lf - npm i -g npm@latest + npm i -g npm@10.8.2 - uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3 with: cache: 'npm' diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a676b9e224..82f457ab6e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,195 +19,195 @@ env: # Passphrase use to encode/decode cliConfig E2E_TOKEN_PASSPHRASE: ${{ secrets.E2E_TOKEN_PASSPHRASE }} jobs: - lint: - name: Lint - runs-on: 'ubuntu-20.04' - steps: - - name: Setup runner - if: ${{matrix.os == 'ubuntu-20.04'}} - # Ensure we can use as many file watcher as we want. see https://github.com/facebook/create-react-app/blob/master/docusaurus/docs/troubleshooting.md#npm-start-fail-due-to-watch-error - run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p - - name: Setup runner - if: ${{matrix.os == 'windows-latest'}} - run: | - git config --global core.autocrlf false - git config --global core.eol lf - npm i -g npm@latest - - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3 - - uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3 - with: - cache: 'npm' - node-version-file: '.nvmrc' - - name: Setup repo - run: npm ci - - name: Check linting - run: npm run lint - unit-tests: - name: Unit Tests - runs-on: ${{matrix.os}} - strategy: - fail-fast: true - matrix: - os: ['ubuntu-20.04', 'windows-latest'] - steps: - - name: Setup runner - if: ${{matrix.os == 'ubuntu-20.04'}} - # Ensure we can use as many file watcher as we want. see https://github.com/facebook/create-react-app/blob/master/docusaurus/docs/troubleshooting.md#npm-start-fail-due-to-watch-error - run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p - - name: Setup runner - if: ${{matrix.os == 'windows-latest'}} - run: | - git config --global core.autocrlf false - git config --global core.eol lf - npm i -g npm@latest - - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3 - - uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3 - with: - cache: 'npm' - node-version-file: '.nvmrc' - - name: Setup repo - run: npm ci - - name: Build - run: npm run build - - name: Tests - run: npm run test - e2e-setup-login: - timeout-minutes: 15 - name: End-to-end login - runs-on: 'ubuntu-20.04' - outputs: - cliConfigJson: ${{ steps.setup.outputs.cliConfigJson}} - env: - # ID of the test run to identify resources to teardown. - TEST_RUN_ID: 'id${{ matrix.os }}-${{ github.sha }}-${{ github.run_attempt }}g' - steps: - - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3 - - uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3 - with: - cache: 'npm' - node-version-file: '.nvmrc' - - uses: ./.github/actions/e2e-login - id: setup - e2e-setup-verdaccio: - strategy: - matrix: - os: ['ubuntu-20.04', 'windows-latest'] - name: End-to-end publish packages - runs-on: ${{matrix.os}} - steps: - - name: Setup runner - if: ${{matrix.os == 'windows-latest'}} - run: | - git config --global core.autocrlf false - git config --global core.eol lf - npm i -g npm@latest - - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3 - with: - # pulls all commits (needed for computing the next version) - fetch-depth: 0 - - uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3 - with: - cache: 'npm' - node-version-file: '.nvmrc' - - uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3 - if: ${{matrix.os == 'ubuntu-20.04'}} - with: - path: packages/cli-e2e/verdaccio - key: verdaccio-${{matrix.os}}-${{ github.sha }}-${{ github.run_attempt }} - - uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3 - if: ${{matrix.os == 'windows-latest'}} - with: - path: packages\cli-e2e\verdaccio - key: verdaccio-${{matrix.os}}-${{ github.sha }}-${{ github.run_attempt }} - - run: npm ci - - name: Build - run: npm run build - - name: Setup E2E tests - run: node -r ts-node/register/transpile-only packages/cli-e2e/setup/ci-verdaccio.ts - - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3 - if: cancelled() || failure() || success() - with: - name: ${{matrix.os}}-verdaccio-publish-artifacts - path: ./packages/cli-e2e/artifacts - e2e: - name: End-to-end tests - runs-on: ${{matrix.os}} - needs: [e2e-setup-login, e2e-setup-verdaccio] - strategy: - fail-fast: false - matrix: - os: ['ubuntu-20.04', 'windows-latest'] - node: ['18', '20'] - spec: - [ - 'angular.specs.ts', - 'atomic.specs.ts', - 'auth.specs.ci.ts', - 'deploy.specs.ts', - 'orgList.specs.ts', - 'orgResources.specs.ts', - 'react.specs.ts', - 'vue.specs.ts', - ] - # TODO: fix auth spec with windows - exclude: - - os: windows-latest - spec: auth.specs.ci.ts - env: - # ID of the test run to identify resources to teardown. - 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: - - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3 - - uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3 - if: ${{matrix.os == 'ubuntu-20.04'}} - with: - path: packages/cli-e2e/verdaccio - key: verdaccio-${{matrix.os}}-${{ github.sha }}-${{ github.run_attempt }} - restore-keys: verdaccio-${{matrix.os}}-${{ github.sha }} - - uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3 - if: ${{matrix.os == 'windows-latest'}} - with: - path: packages\cli-e2e\verdaccio - key: verdaccio-${{matrix.os}}-${{ github.sha }}-${{ github.run_attempt }} - restore-keys: verdaccio-${{matrix.os}}-${{ github.sha }} - - uses: ./.github/actions/e2e-run - with: - os: ${{ matrix.os }} - node: ${{ matrix.node }} - spec: ${{ matrix.spec }} - cliConfigJson: ${{ env.CLI_CONFIG_JSON }} - npmRegistry: 'http://127.0.0.1:4873' - e2e-teardown: - timeout-minutes: 15 - name: End-to-end teardown - if: ${{ always() }} - needs: [e2e, e2e-setup-login] - runs-on: ubuntu-20.04 - env: - # ID of the test run to identify resources to teardown. - TEST_RUN_ID: '${{ github.sha }}-${{ github.run_attempt }}g' - CLI_CONFIG_JSON: ${{needs.e2e-setup-login.outputs.cliConfigJson}} - steps: - - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3 - - uses: ./.github/actions/e2e-clean - with: - cliConfigJson: ${{ env.CLI_CONFIG_JSON }} - e2e-report: - name: End-to-end status reporter - if: ${{ always() }} - needs: e2e - runs-on: ubuntu-20.04 - steps: - - name: Check e2e matrix status - if: ${{ needs.e2e.result != 'success' }} - run: exit 1 + # lint: + # name: Lint + # runs-on: 'ubuntu-20.04' + # steps: + # - name: Setup runner + # if: ${{matrix.os == 'ubuntu-20.04'}} + # # Ensure we can use as many file watcher as we want. see https://github.com/facebook/create-react-app/blob/master/docusaurus/docs/troubleshooting.md#npm-start-fail-due-to-watch-error + # run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p + # - name: Setup runner + # if: ${{matrix.os == 'windows-latest'}} + # run: | + # git config --global core.autocrlf false + # git config --global core.eol lf + # npm i -g npm@10.8.2 + # - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3 + # - uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3 + # with: + # cache: 'npm' + # node-version-file: '.nvmrc' + # - name: Setup repo + # run: npm ci + # - name: Check linting + # run: npm run lint + # unit-tests: + # name: Unit Tests + # runs-on: ${{matrix.os}} + # strategy: + # fail-fast: true + # matrix: + # os: ['ubuntu-20.04', 'windows-latest'] + # steps: + # - name: Setup runner + # if: ${{matrix.os == 'ubuntu-20.04'}} + # # Ensure we can use as many file watcher as we want. see https://github.com/facebook/create-react-app/blob/master/docusaurus/docs/troubleshooting.md#npm-start-fail-due-to-watch-error + # run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p + # - name: Setup runner + # if: ${{matrix.os == 'windows-latest'}} + # run: | + # git config --global core.autocrlf false + # git config --global core.eol lf + # npm i -g npm@10.8.2 + # - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3 + # - uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3 + # with: + # cache: 'npm' + # node-version-file: '.nvmrc' + # - name: Setup repo + # run: npm ci + # - name: Build + # run: npm run build + # - name: Tests + # run: npm run test + # e2e-setup-login: + # timeout-minutes: 15 + # name: End-to-end login + # runs-on: 'ubuntu-20.04' + # outputs: + # cliConfigJson: ${{ steps.setup.outputs.cliConfigJson}} + # env: + # # ID of the test run to identify resources to teardown. + # TEST_RUN_ID: 'id${{ matrix.os }}-${{ github.sha }}-${{ github.run_attempt }}g' + # steps: + # - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3 + # - uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3 + # with: + # cache: 'npm' + # node-version-file: '.nvmrc' + # - uses: ./.github/actions/e2e-login + # id: setup + # e2e-setup-verdaccio: + # strategy: + # matrix: + # os: ['ubuntu-20.04', 'windows-latest'] + # name: End-to-end publish packages + # runs-on: ${{matrix.os}} + # steps: + # - name: Setup runner + # if: ${{matrix.os == 'windows-latest'}} + # run: | + # git config --global core.autocrlf false + # git config --global core.eol lf + # npm i -g npm@10.8.2 + # - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3 + # with: + # # pulls all commits (needed for computing the next version) + # fetch-depth: 0 + # - uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3 + # with: + # cache: 'npm' + # node-version-file: '.nvmrc' + # - uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3 + # if: ${{matrix.os == 'ubuntu-20.04'}} + # with: + # path: packages/cli-e2e/verdaccio + # key: verdaccio-${{matrix.os}}-${{ github.sha }}-${{ github.run_attempt }} + # - uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3 + # if: ${{matrix.os == 'windows-latest'}} + # with: + # path: packages\cli-e2e\verdaccio + # key: verdaccio-${{matrix.os}}-${{ github.sha }}-${{ github.run_attempt }} + # - run: npm ci + # - name: Build + # run: npm run build + # - name: Setup E2E tests + # run: node -r ts-node/register/transpile-only packages/cli-e2e/setup/ci-verdaccio.ts + # - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3 + # if: cancelled() || failure() || success() + # with: + # name: ${{matrix.os}}-verdaccio-publish-artifacts + # path: ./packages/cli-e2e/artifacts + # e2e: + # name: End-to-end tests + # runs-on: ${{matrix.os}} + # needs: [e2e-setup-login, e2e-setup-verdaccio] + # strategy: + # fail-fast: false + # matrix: + # os: ['ubuntu-20.04', 'windows-latest'] + # node: ['18', '20'] + # spec: + # [ + # 'angular.specs.ts', + # 'atomic.specs.ts', + # 'auth.specs.ci.ts', + # 'deploy.specs.ts', + # 'orgList.specs.ts', + # 'orgResources.specs.ts', + # 'react.specs.ts', + # 'vue.specs.ts', + # ] + # # TODO: fix auth spec with windows + # exclude: + # - os: windows-latest + # spec: auth.specs.ci.ts + # env: + # # ID of the test run to identify resources to teardown. + # 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: + # - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3 + # - uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3 + # if: ${{matrix.os == 'ubuntu-20.04'}} + # with: + # path: packages/cli-e2e/verdaccio + # key: verdaccio-${{matrix.os}}-${{ github.sha }}-${{ github.run_attempt }} + # restore-keys: verdaccio-${{matrix.os}}-${{ github.sha }} + # - uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3 + # if: ${{matrix.os == 'windows-latest'}} + # with: + # path: packages\cli-e2e\verdaccio + # key: verdaccio-${{matrix.os}}-${{ github.sha }}-${{ github.run_attempt }} + # restore-keys: verdaccio-${{matrix.os}}-${{ github.sha }} + # - uses: ./.github/actions/e2e-run + # with: + # os: ${{ matrix.os }} + # node: ${{ matrix.node }} + # spec: ${{ matrix.spec }} + # cliConfigJson: ${{ env.CLI_CONFIG_JSON }} + # npmRegistry: 'http://127.0.0.1:4873' + # e2e-teardown: + # timeout-minutes: 15 + # name: End-to-end teardown + # if: ${{ always() }} + # needs: [e2e, e2e-setup-login] + # runs-on: ubuntu-20.04 + # env: + # # ID of the test run to identify resources to teardown. + # TEST_RUN_ID: '${{ github.sha }}-${{ github.run_attempt }}g' + # CLI_CONFIG_JSON: ${{needs.e2e-setup-login.outputs.cliConfigJson}} + # steps: + # - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3 + # - uses: ./.github/actions/e2e-clean + # with: + # cliConfigJson: ${{ env.CLI_CONFIG_JSON }} + # e2e-report: + # name: End-to-end status reporter + # if: ${{ always() }} + # needs: e2e + # runs-on: ubuntu-20.04 + # steps: + # - name: Check e2e matrix status + # if: ${{ needs.e2e.result != 'success' }} + # run: exit 1 prerelease: timeout-minutes: 15 name: Pre-release if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} - needs: [e2e-report, lint, unit-tests] + # needs: [e2e-report, lint, unit-tests] runs-on: ubuntu-20.04 environment: prerelease steps: diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 82df9d327e..eca9060fdf 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -31,10 +31,10 @@ jobs: - name: Checkout repository uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3 - name: Initialize CodeQL - uses: github/codeql-action/init@f3feb00acb00f31a6f60280e6ace9ca31d91c76a # v2 + uses: github/codeql-action/init@9e8d0789d4a0fa9ceb6b1738f7e269594bdd67f0 # v3 with: languages: ${{ matrix.language }} config-file: .github/codeql/config.yml - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@f3feb00acb00f31a6f60280e6ace9ca31d91c76a # v2 + uses: github/codeql-action/analyze@9e8d0789d4a0fa9ceb6b1738f7e269594bdd67f0 # v3 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 55d822cea6..3824d2a0cb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -28,28 +28,28 @@ env: E2E_TOKEN_PASSPHRASE: ${{ secrets.E2E_TOKEN_PASSPHRASE }} jobs: - e2e-setup-login: - name: End-to-end login - runs-on: 'ubuntu-20.04' - timeout-minutes: 30 - outputs: - cliConfigJson: ${{ steps.setup.outputs.cliConfigJson}} - env: - # ID of the test run to identify resources to teardown. - TEST_RUN_ID: 'idubuntu-20.04-${{ github.sha }}-${{ github.run_attempt }}-releaseg' - steps: - - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3 - with: - # pulls all commits (needed for computing the next version) - fetch-depth: 0 - - uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3 - with: - cache: 'npm' - node-version-file: '.nvmrc' - - name: Install Coveo CLI - run: npm i -g @coveo/cli@latest - - uses: ./.github/actions/e2e-login - id: setup + # e2e-setup-login: + # name: End-to-end login + # runs-on: 'ubuntu-20.04' + # timeout-minutes: 30 + # outputs: + # cliConfigJson: ${{ steps.setup.outputs.cliConfigJson}} + # env: + # # ID of the test run to identify resources to teardown. + # TEST_RUN_ID: 'idubuntu-20.04-${{ github.sha }}-${{ github.run_attempt }}-releaseg' + # steps: + # - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3 + # with: + # # pulls all commits (needed for computing the next version) + # fetch-depth: 0 + # - uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3 + # with: + # cache: 'npm' + # node-version-file: '.nvmrc' + # - name: Install Coveo CLI + # run: npm i -g @coveo/cli@latest + # - uses: ./.github/actions/e2e-login + # id: setup release-npm: environment: 'Release' runs-on: ubuntu-20.04 @@ -95,135 +95,136 @@ jobs: # RELEASER_CLIENT_SECRET: ${{ secrets.RELEASER_CLIENT_SECRET }} # RELEASER_INSTALLATION_ID: ${{ secrets.RELEASER_INSTALLATION_ID }} # DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }} - e2e: - name: End-to-end tests - runs-on: ubuntu-20.04 - needs: [release-npm, e2e-setup-login] - timeout-minutes: 60 - env: - TEST_RUN_ID: 'idubuntu-20.04-${{ github.sha }}-${{ github.run_attempt }}-releaseg' # ID of the test run to identify resources to teardown. - COVEO_DISABLE_AUTOUPDATE: true - CLI_CONFIG_JSON: ${{needs.e2e-setup-login.outputs.cliConfigJson}} - strategy: - fail-fast: false - matrix: - spec: - [ - 'angular.specs.ts', - 'atomic.specs.ts', - 'auth.specs.ci.ts', - 'orgList.specs.ts', - 'orgResources.specs.ts', - 'react.specs.ts', - 'vue.specs.ts', - ] - steps: - - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3 - with: - # pulls all commits (needed for computing the next version) - fetch-depth: 0 - - uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3 - with: - registry-url: 'https://registry.npmjs.org' - cache: 'npm' - node-version-file: '.nvmrc' - - name: Download artifacts - uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3 - with: - name: npm-release - - name: Apply & delete the patch - run: | - git apply release.patch - rm release.patch - - name: Install dependencies - run: npm ci - - name: Install Coveo CLI - run: npm i -g @coveo/cli@latest - - uses: ./.github/actions/e2e-run - with: - os: 'ubuntu-20.04' - node: 18 - spec: ${{ matrix.spec }} - cliConfigJson: ${{ env.CLI_CONFIG_JSON }} - jestFlags: '-u' - - name: Find modified Snapshots - id: snapshots-path - run: | - { - echo 'snapshotsPath<> "$GITHUB_OUTPUT" - - name: Upload Jest Snapshots - if: ${{ steps.snapshots-path.outputs.snapshotsPath != ''}} - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3 - with: - name: release-e2e-snaps - path: ${{ steps.snapshots-path.outputs.snapshotsPath }} - e2e-teardown: - name: End-to-end teardown - if: ${{ always() }} - needs: [e2e, e2e-setup-login] - runs-on: ubuntu-20.04 - env: - # ID of the test run to identify resources to teardown. - TEST_RUN_ID: '${{ github.sha }}-${{ github.run_attempt }}-releaseg' - CLI_CONFIG_JSON: ${{needs.e2e-setup-login.outputs.cliConfigJson}} - steps: - - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3 - with: - # pulls all commits (needed for computing the next version) - fetch-depth: 0 - # pulls all tags (needed for computing the next version) - - run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* - - name: Checkout last tag - run: git checkout $(git describe --abbrev=0 --tags) - - uses: ./.github/actions/e2e-clean - with: - cliConfigJson: ${{ env.CLI_CONFIG_JSON }} - unit-tests: - name: Unit Tests - runs-on: 'ubuntu-20.04' - needs: [release-npm] - steps: - - name: Setup runner - # Ensure we can use as many file watcher as we want. see https://github.com/facebook/create-react-app/blob/master/docusaurus/docs/troubleshooting.md#npm-start-fail-due-to-watch-error - run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p - - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3 - - uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3 - with: - cache: 'npm' - node-version-file: '.nvmrc' - - name: Download artifacts - uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3 - with: - name: npm-release - - name: Apply & delete the patch - run: | - git apply release.patch - rm release.patch - - name: Setup repo - run: npm ci - - name: Build - run: npm run build - - name: Tests - run: npm run test:ci:snap - - name: Find modified Snapshots - id: snapshots-path - run: | - { - echo 'snapshotsPath<> "$GITHUB_OUTPUT" - - name: Upload Jest Snapshots - if: ${{ steps.snapshots-path.outputs.snapshotsPath != ''}} - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3 - with: - name: release-e2e-snaps - path: ${{ steps.snapshots-path.outputs.snapshotsPath }} + # e2e: + # name: End-to-end tests + # runs-on: ubuntu-20.04 + # needs: [release-npm, e2e-setup-login] + # timeout-minutes: 60 + # env: + # TEST_RUN_ID: 'idubuntu-20.04-${{ github.sha }}-${{ github.run_attempt }}-releaseg' # ID of the test run to identify resources to teardown. + # COVEO_DISABLE_AUTOUPDATE: true + # CLI_CONFIG_JSON: ${{needs.e2e-setup-login.outputs.cliConfigJson}} + # strategy: + # fail-fast: false + # matrix: + # spec: + # [ + # 'angular.specs.ts', + # 'atomic.specs.ts', + # 'auth.specs.ci.ts', + # 'orgList.specs.ts', + # 'orgResources.specs.ts', + # 'react.specs.ts', + # 'vue.specs.ts', + # ] + # steps: + # - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3 + # with: + # # pulls all commits (needed for computing the next version) + # fetch-depth: 0 + # - uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3 + # with: + # registry-url: 'https://registry.npmjs.org' + # cache: 'npm' + # node-version-file: '.nvmrc' + # - name: Download artifacts + # uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3 + # with: + # name: npm-release + # - name: Apply & delete the patch + # run: | + # git apply release.patch + # rm release.patch + # - name: Install dependencies + # run: npm ci + # - name: Install Coveo CLI + # run: npm i -g @coveo/cli@latest + # - uses: ./.github/actions/e2e-run + # with: + # os: 'ubuntu-20.04' + # node: 18 + # spec: ${{ matrix.spec }} + # cliConfigJson: ${{ env.CLI_CONFIG_JSON }} + # jestFlags: '-u' + # - name: Find modified Snapshots + # id: snapshots-path + # run: | + # { + # echo 'snapshotsPath<> "$GITHUB_OUTPUT" + # - name: Upload Jest Snapshots + # if: ${{ steps.snapshots-path.outputs.snapshotsPath != ''}} + # uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3 + # with: + # name: release-e2e-snaps + # path: ${{ steps.snapshots-path.outputs.snapshotsPath }} + # e2e-teardown: + # name: End-to-end teardown + # if: ${{ always() }} + # needs: [e2e, e2e-setup-login] + # runs-on: ubuntu-20.04 + # env: + # # ID of the test run to identify resources to teardown. + # TEST_RUN_ID: '${{ github.sha }}-${{ github.run_attempt }}-releaseg' + # CLI_CONFIG_JSON: ${{needs.e2e-setup-login.outputs.cliConfigJson}} + # steps: + # - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3 + # with: + # # pulls all commits (needed for computing the next version) + # fetch-depth: 0 + # # pulls all tags (needed for computing the next version) + # - run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* + # - name: Checkout last tag + # run: git checkout $(git describe --abbrev=0 --tags) + # - uses: ./.github/actions/e2e-clean + # with: + # cliConfigJson: ${{ env.CLI_CONFIG_JSON }} + # unit-tests: + # name: Unit Tests + # runs-on: 'ubuntu-20.04' + # needs: [release-npm] + # steps: + # - name: Setup runner + # # Ensure we can use as many file watcher as we want. see https://github.com/facebook/create-react-app/blob/master/docusaurus/docs/troubleshooting.md#npm-start-fail-due-to-watch-error + # run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p + # - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3 + # - uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3 + # with: + # cache: 'npm' + # node-version-file: '.nvmrc' + # - name: Download artifacts + # uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3 + # with: + # name: npm-release + # - name: Apply & delete the patch + # run: | + # git apply release.patch + # rm release.patch + # - name: Setup repo + # run: npm ci + # - name: Build + # run: npm run build + # - name: Tests + # run: npm run test:ci:snap + # - name: Find modified Snapshots + # id: snapshots-path + # run: | + # { + # echo 'snapshotsPath<> "$GITHUB_OUTPUT" + # - name: Upload Jest Snapshots + # if: ${{ steps.snapshots-path.outputs.snapshotsPath != ''}} + # uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3 + # with: + # name: release-e2e-snaps + # path: ${{ steps.snapshots-path.outputs.snapshotsPath }} release-git: - needs: [e2e, release-npm, unit-tests] + # needs: [e2e, release-npm, unit-tests] + needs: [release-npm] environment: 'Release' runs-on: ubuntu-20.04 env: @@ -246,10 +247,10 @@ jobs: run: | git apply release.patch rm release.patch - - name: Download E2E artifacts - uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3 - with: - name: release-e2e-snaps + # - name: Download E2E artifacts + # uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3 + # with: + # name: release-e2e-snaps - name: Install dependencies run: npm ci - name: Release Git diff --git a/.github/workflows/renovate-jest-snap-updater.yml b/.github/workflows/renovate-jest-snap-updater.yml index b6dc27dc50..5a37471f85 100644 --- a/.github/workflows/renovate-jest-snap-updater.yml +++ b/.github/workflows/renovate-jest-snap-updater.yml @@ -33,7 +33,7 @@ jobs: run: | git config --global core.autocrlf false git config --global core.eol lf - npm i -g npm@latest + npm i -g npm@10.8.2 - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3 with: ref: ${{ github.event.workflow_run.head_branch }}