Skip to content

Commit

Permalink
chore: try setting data dir in previous step
Browse files Browse the repository at this point in the history
  • Loading branch information
iowillhoit committed Sep 18, 2023
1 parent 82aacdf commit e01fd4d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/just-nut.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ jobs:
ONEGP_TESTKIT_AUTH_URL: ${{ secrets.ONEGP_TESTKIT_AUTH_URL }}
TESTKIT_SETUP_RETRIES: 2
SF_DISABLE_TELEMETRY: true
SF_DATA_DIR: /home/runner/work/_temp/sf-data-dir

steps:
- uses: actions/checkout@v3
Expand All @@ -86,19 +85,21 @@ 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: Set SF_DATA_DIR for JIT
if: ${{ inputs.jit }}
run: echo "SF_DATA_DIR=${{ runner.temp }}/sf-data-dir" >> "$GITHUB_ENV"
- 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
# echo "SF_DATA_DIR=${{ runner.temp }}/sf-data-dir" >> "$GITHUB_ENV"
run: |
RAW_URL=$(gh browse package.json --repo "${{ inputs.repository }}" --no-browser | sed 's/github.com/raw.githubusercontent.com/' | sed 's/tree\/main/main/')
NPM_NAME=$(curl --silent "$RAW_URL" | jq -r '.name')
sf plugins install "$NPM_NAME" --jit
- name: Log SF_DATA_DIR
run: |
echo "SF_DATA_DIR=${{ env.SF_DATA_DIR }}"
echo "SF_DATA_DIR is: ${{ env.SF_DATA_DIR }}"
ls -la "${{ env.SF_DATA_DIR }}"
cat "${{ env.SF_DATA_DIR }}/package.json"
- name: Run NUT (with retries)
Expand Down

0 comments on commit e01fd4d

Please sign in to comment.