diff --git a/.github/workflows/just-nut.yml b/.github/workflows/just-nut.yml index 8cd69537..ab392611 100644 --- a/.github/workflows/just-nut.yml +++ b/.github/workflows/just-nut.yml @@ -20,6 +20,11 @@ on: description: 'runs-on property, ex: ubuntu-latest, windows-latest' type: string default: 'ubuntu-latest' + jit: + required: false + description: 'install JIT plugin before running tests' + type: boolean + default: false workflow_call: inputs: channel-or-version: @@ -40,6 +45,11 @@ on: description: 'runs-on property, ex: ubuntu-latest, windows-latest' type: string default: 'ubuntu-latest' + jit: + required: false + description: 'install JIT plugin before running tests' + type: boolean + default: false jobs: just-nut: @@ -59,7 +69,7 @@ jobs: steps: - uses: actions/checkout@v3 with: - repository: ${{inputs.repository}} + repository: ${{ inputs.repository }} token: ${{ secrets.SVC_CLI_BOT_GITHUB_TOKEN }} path: . - uses: actions/setup-node@v3 @@ -74,6 +84,14 @@ jobs: command: npm install -g @salesforce/cli@${{ inputs.channel-or-version }} --omit=dev timeout_minutes: 60 - uses: salesforcecli/github-workflows/.github/actions/yarnInstallWithRetries@main + - name: Install JIT plugin + if: ${{ inputs.jit }} + # We set SF_DATA_DIR to ensure JIT plugins are only installed once + # Otherwise each TestSession reinstalls the JIT plugin in its custom HOME dir + # The --jit flag ensures we get the JIT plugin version set in the sf package.json + run: | + echo "SF_DATA_DIR=${{ runner.temp }}/sf-data-dir" >> $GITHUB_ENV + sf plugins install ${{ inputs.repository }} --jit - name: Run NUT (with retries) uses: nick-fields/retry@943e742917ac94714d2f408a0e8320f2d1fcafcd with: diff --git a/.github/workflows/just-nuts.yml b/.github/workflows/just-nuts.yml index 9e1ef7cf..52d0735e 100644 --- a/.github/workflows/just-nuts.yml +++ b/.github/workflows/just-nuts.yml @@ -24,16 +24,11 @@ jobs: os: [ubuntu-latest, windows-latest] repository: - salesforcecli/plugin-auth - - salesforcecli/plugin-community - - salesforcecli/plugin-custom-metadata - salesforcecli/plugin-data - - salesforcecli/plugin-dev - - salesforcecli/plugin-env - salesforcecli/plugin-limits - salesforcecli/plugin-org - salesforcecli/plugin-schema - salesforcecli/plugin-settings - - salesforcecli/plugin-signups - salesforcecli/plugin-sobject - salesforcecli/plugin-templates - salesforcecli/plugin-user @@ -44,6 +39,30 @@ jobs: os: ${{matrix.os}} secrets: inherit + jit: + strategy: + fail-fast: false + max-parallel: 6 + matrix: + os: [ubuntu-latest, windows-latest] + repository: + - salesforcecli/plugin-custom-metadata + - salesforcecli/plugin-community + - salesforcecli/plugin-dev + - salesforcecli/plugin-signups + # - salesforce/plugin-devops-center + # - salesforcecli/plugin-env + # - salesforce/plugin-functions + # - salesforce/sfdx-plugin-lwc-test + # - salesforce/sfdx-scanner + uses: ./.github/workflows/just-nut.yml + with: + repository: ${{matrix.repository}} + channel-or-version: ${{ inputs.channel-or-version }} + os: ${{matrix.os}} + jit: true + secrets: inherit + packaging: strategy: fail-fast: false @@ -58,6 +77,7 @@ jobs: channel-or-version: ${{ inputs.channel-or-version }} os: ${{matrix.os}} command: ${{matrix.command}} + jit: true secrets: inherit source: diff --git a/package.json b/package.json index 5e05c5e8..fc5c5ced 100644 --- a/package.json +++ b/package.json @@ -126,7 +126,7 @@ "@oclif/plugin-commands": "2.2.25", "@oclif/plugin-help": "5.2.19", "@oclif/plugin-not-found": "2.4.1", - "@oclif/plugin-plugins": "3.6.1", + "@oclif/plugin-plugins": "3.7.0", "@oclif/plugin-search": "0.0.22", "@oclif/plugin-update": "3.2.3", "@oclif/plugin-version": "1.3.10", diff --git a/yarn.lock b/yarn.lock index e2d08039..46e16732 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1228,10 +1228,10 @@ chalk "^4" fast-levenshtein "^3.0.0" -"@oclif/plugin-plugins@3.6.1": - version "3.6.1" - resolved "https://registry.yarnpkg.com/@oclif/plugin-plugins/-/plugin-plugins-3.6.1.tgz#e7a7b5ec68b3c0d2a159e1d784f96af674e03d4a" - integrity sha512-+Av9eVQ+WdjZbYZBDmSMrhw5vNTVIKSh3gC61dFHxXITMq8EQ2kJECFRfJ9lJbYvj8QjpPp9ISGieIerZNetmw== +"@oclif/plugin-plugins@3.7.0": + version "3.7.0" + resolved "https://registry.yarnpkg.com/@oclif/plugin-plugins/-/plugin-plugins-3.7.0.tgz#752c1839ce711b14a06c2b80c55b9b9f4af9376f" + integrity sha512-cHH8o5sFwyhYd/udZ/E63FgIjkRyUw0q9TNC62NcRi2D43eRW/6bXShnvO8o+D9WCfQWrnGw+DX6In3CBsIgIw== dependencies: "@oclif/core" "^2.15.0" chalk "^4.1.2"