Skip to content

fix: clear timeout when prompt times out #993

fix: clear timeout when prompt times out

fix: clear timeout when prompt times out #993

Workflow file for this run

name: tests
on:
push:
branches-ignore: [main]
workflow_dispatch:
jobs:
yarn-lockfile-check:
uses: salesforcecli/github-workflows/.github/workflows/lockFileCheck.yml@main
linux-unit-tests:
needs: yarn-lockfile-check
uses: salesforcecli/github-workflows/.github/workflows/unitTestsLinux.yml@main
windows-unit-tests:
needs: linux-unit-tests
uses: salesforcecli/github-workflows/.github/workflows/unitTestsWindows.yml@main
integration:
needs: linux-unit-tests
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
node_version: [lts/*, latest]
exclude:
- os: windows-latest
node_version: lts/*
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node_version }}
cache: yarn
- uses: salesforcecli/github-workflows/.github/actions/yarnInstallWithRetries@main
- run: yarn build
- if: runner.os == 'Windows'
run: yarn mocha --forbid-only "test/**/*.integration.ts" --exclude "test/integration/sf.integration.ts" --parallel --timeout 1200000
- if: runner.os == 'Linux'
run: yarn test:integration
windows-sf-integration:
# For whatever reason the windows-latest runner doesn't like it when you shell yarn commands in the sf repo
# which is an integral part of the setup for the tests. Instead, we replicate the setup here.
needs: linux-unit-tests
strategy:
fail-fast: false
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: latest
cache: yarn
- uses: salesforcecli/github-workflows/.github/actions/yarnInstallWithRetries@main
- run: yarn build
- run: yarn link
- run: New-Item -Path D:\a -Name "integration" -ItemType "directory"
- run: New-Item -Path D:\a\integration -Name "sf.integration.ts" -ItemType "directory"
- run: |
git clone https://github.com/salesforcecli/cli.git
cd cli
$Json = Get-Content package.json | ConvertFrom-Json
$Json.dependencies | Add-Member -Force -MemberType NoteProperty -Name "@oclif/core" -Value "file:D:\a\core\core"
$Json.resolutions | Add-Member -MemberType NoteProperty -Name "@oclif/core" -Value "D:\a\core\core"
$Json | ConvertTo-Json -Depth 9 | Out-File package.json
yarn install --network-timeout 600000
yarn link @oclif/core
yarn build
working-directory: D:\a\integration\sf.integration.ts
- run: yarn mocha --forbid-only "test/integration/sf.integration.ts" --parallel --timeout 1200000
env:
OCLIF_CORE_INTEGRATION_SKIP_SETUP: true
OCLIF_CORE_INTEGRATION_TEST_DIR: D:\a\integration
DEBUG: integration:*
esm-cjs-interop:
needs: linux-unit-tests
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
node_version: [lts/*, latest]
test: [esm, cjs, precore, coreV1, coreV2]
exclude:
- os: windows-latest
node_version: lts/*
fail-fast: false
runs-on: ${{ matrix.os }}
timeout-minutes: 75
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node_version }}
cache: yarn
- uses: salesforcecli/github-workflows/.github/actions/yarnInstallWithRetries@main
- run: yarn build
- run: yarn test:esm-cjs --test=${{ matrix.test }}
nuts:
needs: linux-unit-tests
uses: salesforcecli/github-workflows/.github/workflows/externalNut.yml@main
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
externalProjectGitUrl:
- https://github.com/salesforcecli/plugin-auth
- https://github.com/salesforcecli/plugin-data
- https://github.com/salesforcecli/plugin-org
- https://github.com/salesforcecli/plugin-schema
- https://github.com/salesforcecli/plugin-user
with:
packageName: '@oclif/core'
externalProjectGitUrl: ${{ matrix.externalProjectGitUrl }}
command: 'yarn test:nuts'
os: ${{ matrix.os }}
useCache: false
preSwapCommands: 'npx yarn-deduplicate; yarn install'
preExternalBuildCommands: 'shx rm -rf node_modules/@salesforce/sf-plugins-core/node_modules/@oclif/core'
ignoreScripts: true
secrets:
TESTKIT_AUTH_URL: ${{ secrets.TESTKIT_AUTH_URL }}
TESTKIT_HUB_USERNAME: ${{ secrets.TESTKIT_HUB_USERNAME }}
TESTKIT_JWT_CLIENT_ID: ${{ secrets.TESTKIT_JWT_CLIENT_ID }}
TESTKIT_JWT_KEY: ${{ secrets.TESTKIT_JWT_KEY }}
TESTKIT_HUB_INSTANCE: ${{ secrets.TESTKIT_HUB_INSTANCE }}
external-unit-tests:
needs: linux-unit-tests
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
repo:
- oclif/plugin-autocomplete
- oclif/plugin-commands
- oclif/plugin-help
- oclif/plugin-not-found
- oclif/plugin-plugins
- oclif/plugin-update
- oclif/plugin-which
- oclif/plugin-warn-if-update-available
- oclif/plugin-version
uses: ./.github/workflows/external-test.yml
with:
repo: ${{ matrix.repo }}
os: ${{ matrix.os }}
command: 'yarn mocha test/**/*.test.ts --timeout 1200000'
plugin-plugins-integration:
needs: linux-unit-tests
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
uses: ./.github/workflows/external-test.yml
with:
repo: oclif/plugin-plugins
os: ${{ matrix.os }}
command: 'yarn test:integration'
# plugin-plugins integration tests depend on sf being installed globally
other-setup: npm install -g @salesforce/cli@nightly
plugin-update-integration:
needs: linux-unit-tests
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
uses: ./.github/workflows/external-test.yml
with:
repo: oclif/plugin-update
os: ${{ matrix.os }}
command: 'yarn test:integration:sf'