diff --git a/.github/workflows/03-Run_Unit_Test.yaml b/.github/workflows/02-Run_Unit_Test.yaml similarity index 88% rename from .github/workflows/03-Run_Unit_Test.yaml rename to .github/workflows/02-Run_Unit_Test.yaml index 4976b24c..c4026288 100644 --- a/.github/workflows/03-Run_Unit_Test.yaml +++ b/.github/workflows/02-Run_Unit_Test.yaml @@ -1,4 +1,4 @@ -name: 03-Run Unit Test +name: 02-Run Unit Test on: pull_request: branches: @@ -35,10 +35,22 @@ jobs: START_ADDR_FLASH: 0x8000000 steps: + - name: Trigger + run: echo "Triggered by ${{github.event_name}} event" + + - name: Check Branch Input + run: | + if [ -z "${{ github.event.inputs.branch }}" ]; then + echo "Branch input is required." + exit 1 + fi + echo "Checkout branch ${{ github.event.inputs.branch }}" + - name: Checkout uses: actions/checkout@v4.1.7 with: - ref: "${{ github.event.inputs.branch }}" + ref: "${{ github.event.inputs.branch }}" + - name: Add extension run: | cd $SDK_PATH @@ -106,10 +118,22 @@ jobs: START_ADDR_FLASH: 0x0000000 steps: + - name: Trigger + run: echo "Triggered by ${{github.event_name}} event" + + - name: Check Branch Input + run: | + if [ -z "${{ github.event.inputs.branch }}" ]; then + echo "Branch input is required." + exit 1 + fi + echo "Checkout branch ${{ github.event.inputs.branch }}" + - name: Checkout uses: actions/checkout@v4.1.7 with: - ref: "${{ github.event.inputs.branch }}" + ref: "${{ github.event.inputs.branch }}" + - name: Add extension run: | cd $SDK_PATH