Skip to content

Merge pull request #9 from PocusHQ/hoare-build-branch #11

Merge pull request #9 from PocusHQ/hoare-build-branch

Merge pull request #9 from PocusHQ/hoare-build-branch #11

Workflow file for this run

# on:
# workflow_call:
# secrets:
# TESTKIT_AUTH_URL:
# required: false
# TESTKIT_HUB_USERNAME:
# required: false
# TESTKIT_JWT_CLIENT_ID:
# required: false
# TESTKIT_JWT_KEY:
# required: false
# TESTKIT_HUB_INSTANCE:
# required: false
# inputs:
# externalProjectGitUrl:
# description: "The url that will be cloned. This contains the NUTs you want to run. Ex: https://github.com/salesforcecli/plugin-user"
# type: string
# required: true
# command:
# required: false
# type: string
# default: yarn test:nuts
# description: "command to execute (ex: yarn test:nuts)"
# nodeVersion:
# required: false
# description: version of node to run tests against. Use things like [lts/-1, lts/*, latest] to avoid hardcoding versions
# type: string
# default: lts/*
# os:
# required: false
# description: "runs-on property, ex: ubuntu-latest, windows-latest"
# type: string
# default: "ubuntu-latest"
# useCache:
# required: false
# type: boolean
# default: true
# attempts:
# required: false
# type: number
# default: 3
# branch:
# required: false
# description: "branch to clone from the repo. Defaults to 'main'"
# type: string
# default: "main"
# jobs:
# external-nut:
# name: ${{ inputs.command }}
# runs-on: ${{ inputs.os }}
# steps:
# - uses: actions/setup-node@v3
# with:
# node-version: ${{ inputs.nodeVersion }}
# - uses: nick-fields/retry@943e742917ac94714d2f408a0e8320f2d1fcafcd
# name: cli install
# with:
# max_attempts: ${{ inputs.attempts }}
# command: npm install -g @salesforce/cli@nightly --omit=dev
# timeout_minutes: 20
# - uses: nick-fields/retry@943e742917ac94714d2f408a0e8320f2d1fcafcd
# name: git clone project
# with:
# max_attempts: 5
# command: git clone -b ${{ inputs.branch}} --single-branch ${{ inputs.externalProjectGitUrl}} $(pwd)
# # backoff 60 seconds because most failures are 429 (too many requests)
# retry_wait_seconds: 60
# timeout_minutes: 20
# - uses: actions/checkout@v3
# name: git clone jsforce
# with:
# path: jsforce
# - name: Cache node modules
# if: inputs.useCache
# id: cache-nodemodules
# uses: actions/cache@v3
# env:
# cache-name: cache-node-modules
# with:
# # caching node_modules
# path: node_modules
# key: ${{ runner.os }}-externalNuts-${{ env.cache-name }}-${{ inputs.externalProjectGitUrl}}-${{ inputs.branch}}-${{ github.sha }}
# - uses: salesforcecli/github-workflows/.github/actions/yarnInstallWithRetries@main
# if: ${{ steps.cache-nodemodules.outputs.cache-hit != 'true' }}
# - name: build and create symlink to jsforce-node
# if: ${{ steps.cache-nodemodules.outputs.cache-hit != 'true' }}
# run: |
# cd ./jsforce
# npm install
# ## skip webpack, we are only interested in the node build
# npm run clean && npm run jsforce-node && npm run build:node:cjs
# yarn link
# - name: link jsforce-node into plugin
# if: ${{ steps.cache-nodemodules.outputs.cache-hit != 'true' }}
# # this rely on plugins having just 1 version of jsforce
# # in its top-level node_modules.
# run: yarn link "@jsforce/jsforce-node"
# - name: Build the external project (where the NUTs are)
# run: yarn compile
# - uses: nick-fields/retry@943e742917ac94714d2f408a0e8320f2d1fcafcd
# name: NUTs with ${{ inputs.attempts }} attempts
# with:
# max_attempts: ${{ inputs.attempts }}
# command: ${{ inputs.command }}
# retry_on: error
# timeout_minutes: 60
# env:
# SF_DISABLE_TELEMETRY: true
# TESTKIT_AUTH_URL: ${{ secrets.TESTKIT_AUTH_URL }}
# TESTKIT_HUB_USERNAME: ${{ secrets.TESTKIT_HUB_USERNAME }}
# TESTKIT_HUB_INSTANCE: ${{ secrets.TESTKIT_HUB_INSTANCE }}
# TESTKIT_JWT_CLIENT_ID: ${{ secrets.TESTKIT_JWT_CLIENT_ID }}
# TESTKIT_JWT_KEY: ${{ secrets.TESTKIT_JWT_KEY }}
# TESTKIT_SETUP_RETRIES: 2
# DEBUG: ${{ vars.DEBUG }}