Skip to content

refactor: split get_bin_path function #12

refactor: split get_bin_path function

refactor: split get_bin_path function #12

Workflow file for this run

name: Unit testing
on:
pull_request:
branches:
- develop
- main
paths:
- 'lib/**'
- 'uac'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
name: Unit testing
runs-on: ubuntu-latest
steps:
- name: Checkout uac repository
uses: actions/checkout@v4
with:
repository: tclahr/uac
path: uac
- name: Checkout ushunit repository
uses: actions/checkout@v4
with:
repository: tclahr/ushunit
ref: main
path: ushunit
- name: Check if branch exists in uac-tests
id: check_branch
run: |
branch_exists=$(git ls-remote --heads https://github.com/tclahr/uac-tests.git ${{ github.ref }} | wc -l)
echo "branch_exists=$branch_exists" >> $GITHUB_ENV
- name: Checkout uac-tests repository
if: env.branch_exists == '1'
uses: actions/checkout@v4
with:
repository: tclahr/uac-tests
ref: ${{ github.ref }}
path: uac-tests
- name: Checkout main branch of uac-tests if branch does not exist
if: env.branch_exists != '1'
uses: actions/checkout@v4
with:
repository: tclahr/uac-tests
ref: main
- name: Run tests
working-directory: ushunit
run: |
UAC_DIR="../uac" ./ushunit -i ../uac-tests/tests/lib/*.sh ../uac-tests/tests/*.sh