This repository was archived by the owner on Apr 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 30
85 lines (83 loc) · 3 KB
/
Copy pathjust-nut.yml
File metadata and controls
85 lines (83 loc) · 3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: just-nut
on:
workflow_dispatch:
inputs:
channel-or-version:
description: Version or channel of the CLI to test against (nightly, latest-rc, 7.112.1)
type: string
required: true
repository:
description: 'The repo that will be cloned (format: owner/repo). This contains the NUTs you want to run. Ex: salesforcecli/plugin-user'
type: string
required: true
command:
required: false
type: string
default: yarn test:nuts
description: 'command to execute (ex: yarn test:nuts)'
os:
required: false
description: 'runs-on property, ex: ubuntu-latest, windows-latest'
type: string
default: 'ubuntu-latest'
workflow_call:
inputs:
channel-or-version:
description: Version or channel of the CLI to test against (nightly, latest-rc, 7.112.1)
type: string
required: true
repository:
description: 'The repo that will be cloned (format: owner/repo). This contains the NUTs you want to run. Ex: salesforcecli/plugin-user'
type: string
required: true
command:
required: false
type: string
default: yarn test:nuts
description: 'command to execute (ex: yarn test:nuts)'
os:
required: false
description: 'runs-on property, ex: ubuntu-latest, windows-latest'
type: string
default: 'ubuntu-latest'
jobs:
just-nut:
name: ${{inputs.repository}}
runs-on: ${{inputs.os}}
env:
TESTKIT_EXECUTABLE_PATH: sfdx
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}}
ONEGP_TESTKIT_AUTH_URL: ${{ secrets.ONEGP_TESTKIT_AUTH_URL }}
TESTKIT_SETUP_RETRIES: 2
SF_DISABLE_TELEMETRY: true
steps:
- uses: actions/checkout@v3
with:
repository: ${{inputs.repository}}
token: ${{ secrets.SVC_CLI_BOT_GITHUB_TOKEN }}
path: .
- uses: actions/setup-node@v3
with:
node-version: lts/*
cache: yarn
# NOTE: This will install the highest v1 of sf. This will typically be the nightly.
- name: Install CLIs
uses: nick-fields/retry@943e742917ac94714d2f408a0e8320f2d1fcafcd
with:
max_attempts: 3
retry_wait_seconds: 60
command: npm install -g sfdx-cli@${{ inputs.channel-or-version }} @salesforce/cli@^1 --omit=dev
timeout_minutes: 60
- uses: salesforcecli/github-workflows/.github/actions/yarnInstallWithRetries@main
- name: Run NUT (with retries)
uses: nick-fields/retry@943e742917ac94714d2f408a0e8320f2d1fcafcd
with:
max_attempts: 3
retry_wait_seconds: 1
command: ${{ inputs.command }}
retry_on: error
timeout_minutes: 60