From 559fe422947816073bf1dae7b25c90f87ca58d1d Mon Sep 17 00:00:00 2001 From: Weston Blieden Date: Tue, 15 Sep 2026 12:44:36 +0200 Subject: [PATCH] Run tests/run.sh in CI when a repo has one Regenerated from Axis_Cam_Template/ci/build.yml.tmpl via acap-ci.sh. Repos without a tests/run.sh skip the step. --- .github/workflows/build.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0b076b0..0af6157 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -61,6 +61,18 @@ jobs: - name: Apply version and upstream pins run: ./ci/apply-version.sh "$VERSION" "$UPSTREAM_VERSION" + # Repos without a tests/run.sh simply skip this. + - name: Run unit tests + run: | + set -euo pipefail + if [ -x tests/run.sh ] || [ -f tests/run.sh ]; then + sudo apt-get update + sudo apt-get install -y --no-install-recommends pkg-config libglib2.0-dev + sh tests/run.sh + else + echo "no tests/run.sh, skipping" + fi + - name: Build packages run: ./ci/build-packages.sh