Files
FWS-PacManage/.gitea/workflows/test.yml
T
BlackAngelTV 096553e429
tests / build-test (push) Has been cancelled
ci(tests): install dependencies via the host package manager
Host-mode runners execute jobs directly on the runner machine, so apt
fails on non-Debian hosts. Detect pacman/apt/dnf so the test workflow
runs on any Linux host, and pull in git as a safety net for checkout.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
2026-08-29 20:50:49 +02:00

55 lines
1.6 KiB
YAML

# Gitea Actions — Tests
#
# Dedicated test workflow: builds the application and runs the full test suite
# (ctest) on every push and pull request. Kept separate from the release
# workflow so a failing test never blocks a release.
name: tests
on:
push:
pull_request:
workflow_dispatch:
jobs:
build-test:
runs-on: linux
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install dependencies
run: |
# Host-mode runners execute jobs directly on the runner machine, so
# detect its package manager instead of hardcoding apt (which only
# exists on Debian/Ubuntu hosts).
if command -v pacman >/dev/null 2>&1; then
sudo pacman -S --noconfirm --needed \
git cmake gcc make qt6-base
elif command -v apt-get >/dev/null 2>&1; then
sudo apt-get update
sudo apt-get install -y \
git cmake g++ make qt6-base-dev
elif command -v dnf >/dev/null 2>&1; then
sudo dnf install -y \
git cmake gcc-c++ make qt6-qtbase-devel
else
echo "Unsupported package manager: install git, cmake, a C++ compiler, make and Qt6 manually" >&2
exit 1
fi
- name: Configure
run: |
cmake -B build \
-DFWS_BUILD_EXAMPLE_PLUGIN=ON \
-DCMAKE_BUILD_TYPE=Release
- name: Build
run: |
cmake --build build -j$(nproc)
- name: Run all tests
run: |
cd build
ctest --output-on-failure