Skip to content

Commit

Permalink
test: local nut test
Browse files Browse the repository at this point in the history
  • Loading branch information
mcarvin8 authored Oct 9, 2024
1 parent b1bec8a commit cd8eb00
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 4 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/nut.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
on:
workflow_call:
inputs:
os:
required: false
description: 'runs-on property, ex: ubuntu-latest, windows-latest'
type: string
default: 'ubuntu-latest'
command:
required: false
type: string
default: yarn test:nuts
description: 'command to execute (ex: yarn test:nuts)'

jobs:
nut:
name: ${{ inputs.command }}
runs-on: ${{ inputs.os }}
steps:
- name: Checkout
uses: actions/[email protected]

- name: Setup Node
uses: actions/[email protected]
with:
node-version: 18
cache: yarn
registry-url: 'https://registry.npmjs.org'

- name: Yarn build
run: yarn build

- name: Install Salesforce CLI, link plugin and Run NUT
run: |
npm install -g @salesforce/cli --unsafe-perm
sf plugins:link .
${{ inputs.command }}
5 changes: 1 addition & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,8 @@ on:
workflow_dispatch:

jobs:
unit-tests:
uses: salesforcecli/github-workflows/.github/workflows/unitTest.yml@main
nuts:
needs: unit-tests
uses: salesforcecli/github-workflows/.github/workflows/nut.yml@main
uses: ./.github/workflows/nut.yml
secrets: inherit
strategy:
matrix:
Expand Down

0 comments on commit cd8eb00

Please sign in to comment.