From cd8eb000f29b899259db3190f4fea2963ad45bec Mon Sep 17 00:00:00 2001 From: Matt Carvin <90224411+mcarvin8@users.noreply.github.com> Date: Wed, 9 Oct 2024 10:29:40 -0400 Subject: [PATCH] test: local nut test --- .github/workflows/nut.yml | 37 +++++++++++++++++++++++++++++++++++++ .github/workflows/test.yml | 5 +---- 2 files changed, 38 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/nut.yml diff --git a/.github/workflows/nut.yml b/.github/workflows/nut.yml new file mode 100644 index 0000000..495f467 --- /dev/null +++ b/.github/workflows/nut.yml @@ -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/checkout@v4.1.1 + + - name: Setup Node + uses: actions/setup-node@v4.0.1 + 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 }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8aa44c7..51a65a3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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: