Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install jit plugins before NUTs #1145

Merged
merged 11 commits into from
Sep 18, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion .github/workflows/just-nut.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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
Expand All @@ -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:
Expand Down
30 changes: 25 additions & 5 deletions .github/workflows/just-nuts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -58,6 +77,7 @@ jobs:
channel-or-version: ${{ inputs.channel-or-version }}
os: ${{matrix.os}}
command: ${{matrix.command}}
jit: true
secrets: inherit

source:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Loading