-
Notifications
You must be signed in to change notification settings - Fork 25
74 lines (64 loc) · 2.18 KB
/
jit-install-smoke.yml
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
name: jit-install-smoke
on:
workflow_dispatch:
workflow_call:
jobs:
manifest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ vars.NODE_VERSION_OVERRIDE || 'lts/*' }}
cache: yarn
- run: yarn install
- run: yarn build
- run: yarn oclif manifest
- uses: actions/upload-artifact@v4
with:
name: manifest
path: oclif.manifest.json
get-jit-plugins:
runs-on: ubuntu-latest
outputs:
jit: ${{ steps.plugins.outputs.jit }}
steps:
- uses: actions/checkout@v4
- name: Get JIT plugins
id: plugins
# This was a pain to get working, be weary of changing it...
# For the dynamic matrix to work, you have to have a VERY specific format:
# Output must be multiline (no jq -c), quotes matter, cannot use toJSON on output, etc...
# The dynamic matrix needs to use fromJSON when reading the needs output
# Multiline format: https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#example-of-a-multiline-string
run: |
{
echo 'jit<<EOF'
jq '.oclif.jitPlugins | keys' package.json
echo EOF
} >> "$GITHUB_OUTPUT"
jit-install:
needs: [manifest, get-jit-plugins]
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
jitPlugins: ${{ fromJSON(needs.get-jit-plugins.outputs.jit) }}
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ vars.NODE_VERSION_OVERRIDE || 'lts/*' }}
- uses: salesforcecli/github-workflows/.github/actions/yarnInstallWithRetries@main
with:
ignore-scripts: true
- run: yarn build
- uses: actions/download-artifact@v4
with:
name: manifest
- name: Install JIT plugin
uses: salesforcecli/github-workflows/.github/actions/retry@main
with:
command: yarn sf-release cli:install:jit:test --jit-plugin ${{ matrix.jitPlugins }}
env:
SF_DISABLE_TELEMETRY: true