From f4f68c50b4ed2a6bfcf3785eb979f7288a4490e3 Mon Sep 17 00:00:00 2001 From: Navneet Wats Date: Mon, 5 Jan 2026 13:10:54 +0530 Subject: [PATCH] Create an initial workflow - unit-tests.yml which installs LV container image and runs on Linux --- .github/workflows/unit-tests.yml | 64 ++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 .github/workflows/unit-tests.yml diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml new file mode 100644 index 0000000..9c7b290 --- /dev/null +++ b/.github/workflows/unit-tests.yml @@ -0,0 +1,64 @@ +name: Run unit tests (GitHub Hosted) + +on: + # TODO: Uncomment the original triggers below when ready for full deployment + # pull_request: + # branches: + # - main + # - develop + # - release/* + # - feature/* + # - hotfix/* + # types: + # - opened + # - synchronize + # - reopened + # - ready_for_review + + push: + branches: + - feature/github-actions-cicd # Temporary: only run on this branch + # - main + # - develop + # - release/* + # - hotfix/* + # - feature/* + + workflow_dispatch: + +jobs: + run-unit-tests: + name: Run unit tests + runs-on: ubuntu-latest + container: + image: nationalinstruments/labview:2025q3patch1-linux + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Verify LabVIEW installation + run: | + echo "Verifying LabVIEW installation..." + labviewcli --version || echo "LabVIEW CLI check complete" + + - name: Run unit tests + shell: bash + working-directory: ${{ github.workspace }} + run: | + REPO_ROOT="${GITHUB_WORKSPACE}" + SCRIPTS_FOLDER="${REPO_ROOT}/pipeline/scripts" + + echo "Repository root: $REPO_ROOT" + echo "Scripts folder: $SCRIPTS_FOLDER" + + # TODO: Adapt the unit test execution for Linux container + # The original Windows script uses: + # - RunUnitTests.ps1 with LabVIEW 2021 32-bit and 64-bit + # - Close_LabVIEW.ps1 to close LabVIEW process + # + # For Linux container, use LabVIEW CLI commands: + # labviewcli -OperationName RunVI -VIPath + + echo "LabVIEW container is ready for unit test execution" + echo "Placeholder: Add LabVIEW CLI commands to run unit tests" \ No newline at end of file