From e4f0f066485b1bea40f40b13b9b476119a133391 Mon Sep 17 00:00:00 2001 From: Alexandre Pujol Date: Tue, 12 Nov 2024 21:43:42 +0000 Subject: [PATCH] tests(ci): install integration tests requirements. --- .github/workflows/main.yml | 1 + tests/requirements.sh | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 tests/requirements.sh diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b07fc899..c4f143f0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -83,6 +83,7 @@ jobs: sudo apt-get install -y \ apparmor-profiles apparmor-utils \ bats bats-support + bash tests/requirements.sh - name: Install apparmor.d run: | diff --git a/tests/requirements.sh b/tests/requirements.sh new file mode 100644 index 00000000..91adc003 --- /dev/null +++ b/tests/requirements.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env bash +# apparmor.d - Full set of apparmor profiles +# Copyright (C) 2024 Alexandre Pujol +# SPDX-License-Identifier: GPL-2.0-only + +# Dependencies for the bats integration tests + +set -eu + +# shellcheck source=/dev/null +_lsb_release() { + . /etc/os-release || exit 1 + echo "$ID" +} +DISTRIBUTION="$(_lsb_release)" + +case "$DISTRIBUTION" in +arch) + ;; +debian | ubuntu | whonix) + sudo apt-get install -y \ + cpuid dfc systemd-userdbd + ;; +opensuse*) + ;; +*) ;; +esac