Merge pull request #2757 from mikiher/fix-unit-tests-flow

Change unit tests workflow to include conditional checkout steps
This commit is contained in:
advplyr 2024-03-17 19:14:41 -05:00 committed by GitHub
commit 8396900178
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -11,13 +11,19 @@ on:
jobs: jobs:
run-unit-tests: run-unit-tests:
name: Run Unit Tests
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout code - name: Checkout (push/pull request)
uses: actions/checkout@v4
if: github.event_name != 'workflow_dispatch'
- name: Checkout (workflow_dispatch)
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
ref: ${{ github.event_name != 'workflow_dispatch' && github.ref_name || inputs.ref}} ref: ${{ inputs.ref }}
if: github.event_name == 'workflow_dispatch'
- name: Set up Node.js - name: Set up Node.js
uses: actions/setup-node@v4 uses: actions/setup-node@v4