fix: use default import from is-wsl #1311
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 --retries 3 | |
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:* | |
interoperability: | |
needs: linux-unit-tests | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
node_version: [lts/*, latest] | |
test: [esm, cjs, precore, coreV1, coreV2, coreV3, esbuild] | |
dev_runtime: [default, bun, tsx] | |
exclude: | |
- os: windows-latest | |
node_version: lts/* | |
- os: windows-latest | |
dev_runtime: tsx | |
- os: windows-latest | |
dev_runtime: bun | |
- test: precore | |
dev_runtime: tsx | |
- test: precore | |
dev_runtime: bun | |
- test: coreV1 | |
dev_runtime: tsx | |
- test: coreV1 | |
dev_runtime: bun | |
- test: coreV2 | |
dev_runtime: tsx | |
- test: coreV2 | |
dev_runtime: bun | |
- test: coreV3 | |
dev_runtime: tsx | |
- test: coreV3 | |
dev_runtime: bun | |
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 | |
- if: matrix.dev_runtime == 'bun' | |
uses: oven-sh/setup-bun@v1 | |
- if: matrix.dev_runtime == 'tsx' | |
run: 'npm install -g tsx' | |
- uses: salesforcecli/github-workflows/.github/actions/yarnInstallWithRetries@main | |
- run: yarn build | |
- run: yarn test:interoperability --test=${{ matrix.test }} --dev-run-time=${{ matrix.dev_runtime }} | |
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 | |
- https://github.com/salesforcecli/plugin-settings | |
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 | |
- oclif/plugin-test-esbuild | |
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] | |
uses: ./.github/workflows/external-test.yml | |
with: | |
repo: oclif/plugin-plugins | |
os: ${{ matrix.os }} | |
command: yarn test:integration --retries 3 | |
# 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 --retries 3 | |
plugin-esbuild-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-test-esbuild-single | |
os: ${{ matrix.os }} | |
command: yarn test |