Files
voculinux/.github/workflows/distro-test-matrix.yml
T
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
3c94f021fd chore(deps): bump the github-actions group with 11 updates (#766)
Bumps the github-actions group with 11 updates:

| Package | From | To |
| --- | --- | --- |
| [actions/checkout](https://github.com/actions/checkout) | `5.1.0` | `7.0.1` |
| [actions/labeler](https://github.com/actions/labeler) | `6.2.0` | `7.0.0` |
| [actions/setup-python](https://github.com/actions/setup-python) | `5.6.0` | `7.0.0` |
| [actions/cache](https://github.com/actions/cache) | `4.3.0` | `6.1.0` |
| [actions/upload-artifact](https://github.com/actions/upload-artifact) | `4.6.2` | `7.0.1` |
| [softprops/action-gh-release](https://github.com/softprops/action-gh-release) | `2.6.2` | `3.0.2` |
| [actions/download-artifact](https://github.com/actions/download-artifact) | `4.3.0` | `8.0.1` |
| [actions/setup-node](https://github.com/actions/setup-node) | `5.0.0` | `7.0.0` |
| [dorny/paths-filter](https://github.com/dorny/paths-filter) | `3.0.4` | `4.0.3` |
| [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv) | `6.8.0` | `10.0.1` |
| [codecov/codecov-action](https://github.com/codecov/codecov-action) | `4.6.0` | `7.0.0` |


Updates `actions/checkout` from 5.1.0 to 7.0.1
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09...3d3c42e5aac5ba805825da76410c181273ba90b1)

Updates `actions/labeler` from 6.2.0 to 7.0.0
- [Release notes](https://github.com/actions/labeler/releases)
- [Commits](https://github.com/actions/labeler/compare/b8dd2d9be0f68b860e7dae5dae7d772984eacd6d...bf12e9b00b37c5c0ca2b87b79b2daf7891dbda13)

Updates `actions/setup-python` from 5.6.0 to 7.0.0
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/a26af69be951a213d495a4c3e4e4022e16d87065...5fda3b95a4ea91299a34e894583c3862153e4b97)

Updates `actions/cache` from 4.3.0 to 6.1.0
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/0057852bfaa89a56745cba8c7296529d2fc39830...55cc8345863c7cc4c66a329aec7e433d2d1c52a9)

Updates `actions/upload-artifact` from 4.6.2 to 7.0.1
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/ea165f8d65b6e75b540449e92b4886f43607fa02...043fb46d1a93c77aae656e7c1c64a875d1fc6a0a)

Updates `softprops/action-gh-release` from 2.6.2 to 3.0.2
- [Release notes](https://github.com/softprops/action-gh-release/releases)
- [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md)
- [Commits](https://github.com/softprops/action-gh-release/compare/3bb12739c298aeb8a4eeaf626c5b8d85266b0e65...3d0d9888cb7fd7b750713d6e236d1fcb99157228)

Updates `actions/download-artifact` from 4.3.0 to 8.0.1
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/d3f86a106a0bac45b974a628896c90dbdf5c8093...3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c)

Updates `actions/setup-node` from 5.0.0 to 7.0.0
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/a0853c24544627f65ddf259abe73b1d18a591444...820762786026740c76f36085b0efc47a31fe5020)

Updates `dorny/paths-filter` from 3.0.4 to 4.0.3
- [Release notes](https://github.com/dorny/paths-filter/releases)
- [Changelog](https://github.com/dorny/paths-filter/blob/master/CHANGELOG.md)
- [Commits](https://github.com/dorny/paths-filter/compare/0e4a8c6effa4802afeda77dc8d303f8176d7dfad...ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d)

Updates `astral-sh/setup-uv` from 6.8.0 to 10.0.1
- [Release notes](https://github.com/astral-sh/setup-uv/releases)
- [Commits](https://github.com/astral-sh/setup-uv/compare/d0cc045d04ccac9d8b7881df0226f9e82c39688e...20cfd1bf945f4377ade1205e4dbc17946fc9a30d)

Updates `codecov/codecov-action` from 4.6.0 to 7.0.0
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238...fb8b3582c8e4def4969c97caa2f19720cb33a72f)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 7.0.1
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: actions/labeler
  dependency-version: 7.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: actions/setup-python
  dependency-version: 7.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: actions/cache
  dependency-version: 6.1.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: actions/upload-artifact
  dependency-version: 7.0.1
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: softprops/action-gh-release
  dependency-version: 3.0.2
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: actions/download-artifact
  dependency-version: 8.0.1
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: actions/setup-node
  dependency-version: 7.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: dorny/paths-filter
  dependency-version: 4.0.3
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: astral-sh/setup-uv
  dependency-version: 10.0.1
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: codecov/codecov-action
  dependency-version: 7.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-09-01 01:06:15 -07:00

285 lines
11 KiB
YAML

name: Distro Test Matrix
on:
push:
branches: [ main, master ]
paths:
- 'install.sh'
- 'scripts/**'
- 'pyproject.toml'
- 'src/vocalinux/version.py'
- '.github/workflows/distro-test-matrix.yml'
pull_request:
branches: [ main, master ]
paths:
- 'install.sh'
- 'scripts/**'
- 'pyproject.toml'
- 'src/vocalinux/version.py'
- '.github/workflows/distro-test-matrix.yml'
workflow_dispatch:
jobs:
test:
name: Test on ${{ matrix.container }}
runs-on: ubuntu-latest
continue-on-error: true
strategy:
fail-fast: false
matrix:
container:
- ubuntu:24.04
- ubuntu:26.04
- debian:12
- fedora:39
container:
image: ${{ matrix.container }}
steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Install basic dependencies
run: |
set -e
# Install bash and basic tools
if command -v apt-get >/dev/null 2>&1; then
apt-get update
apt-get install -y bash curl python3 git
elif command -v dnf >/dev/null 2>&1; then
# Fedora needs cache update first in container environment
dnf clean all || true
dnf makecache || true
dnf install -y bash curl python3 git || {
echo "⚠ dnf install failed, trying with --nogpgcheck..."
dnf install -y --nogpgcheck bash curl python3 git
}
fi
# ============================================================================
# TEST 1: Verify /etc/os-release exists and distro detection works
# ============================================================================
- name: Test distro detection
run: |
echo "=== Testing Distro Detection ==="
if [ -f /etc/os-release ]; then
echo "/etc/os-release exists: OK"
cat /etc/os-release
else
echo "/etc/os-release NOT found: FAIL"
exit 1
fi
# ============================================================================
# TEST 2: Test the distro detection logic from install.sh
# ============================================================================
# Note: We cannot source install.sh directly because it has a root check
# that fails in containers. Instead, we test the same logic independently.
- name: Test detect_distro() function
run: |
echo "=== Testing detect_distro() Function ==="
# Verify the function exists in install.sh
if grep -q "detect_distro()" install.sh; then
echo "✓ detect_distro() function found in install.sh"
else
echo "✗ detect_distro() function not found"
exit 1
fi
# Test the distro detection logic (same as in install.sh)
. /etc/os-release
DISTRO_NAME="$NAME"
DISTRO_ID="$ID"
DISTRO_VERSION="$VERSION_ID"
DISTRO_FAMILY="unknown"
if [[ "$ID" == "ubuntu" || "$ID_LIKE" == *"ubuntu"* || "$ID" == "pop" || "$ID" == "linuxmint" || "$ID" == "elementary" || "$ID" == "zorin" ]]; then
DISTRO_FAMILY="ubuntu"
elif [[ "$ID" == "debian" || "$ID_LIKE" == *"debian"* ]]; then
DISTRO_FAMILY="debian"
elif [[ "$ID" == "fedora" || "$ID_LIKE" == *"fedora"* || "$ID" == "rhel" || "$ID" == "centos" || "$ID" == "rocky" || "$ID" == "almalinux" ]]; then
DISTRO_FAMILY="fedora"
elif [[ "$ID" == "arch" || "$ID_LIKE" == *"arch"* || "$ID" == "manjaro" || "$ID" == "endeavouros" ]]; then
DISTRO_FAMILY="arch"
elif [[ "$ID" == "opensuse" || "$ID_LIKE" == *"suse"* ]]; then
DISTRO_FAMILY="suse"
elif [[ "$ID" == "gentoo" ]]; then
DISTRO_FAMILY="gentoo"
elif [[ "$ID" == "alpine" ]]; then
DISTRO_FAMILY="alpine"
elif [[ "$ID" == "void" ]]; then
DISTRO_FAMILY="void"
elif [[ "$ID" == "solus" ]]; then
DISTRO_FAMILY="solus"
elif [[ "$ID" == "mageia" ]]; then
DISTRO_FAMILY="mageia"
fi
echo "Detected: $DISTRO_NAME $DISTRO_VERSION ($DISTRO_FAMILY family)"
echo "DISTRO_FAMILY=$DISTRO_FAMILY"
echo "DISTRO_ID=$DISTRO_ID"
# Verify we detected a known family
if [[ "$DISTRO_FAMILY" == "unknown" ]]; then
echo "⚠ Warning: Distro family is 'unknown', this may indicate incomplete detection"
else
echo "✓ Distro detection successful"
fi
# ============================================================================
# TEST 3: Test detect_typelib_path() function
# ============================================================================
- name: Test detect_typelib_path() function
run: |
echo "=== Testing detect_typelib_path() Function ==="
# Install pkg-config first (needed for typelib detection)
if command -v apt-get >/dev/null 2>&1; then
apt-get install -y pkg-config libgirepository1.0-dev 2>/dev/null || true
elif command -v dnf >/dev/null 2>&1; then
dnf install -y pkg-config gobject-introspection-devel 2>/dev/null || true
fi
# Test typelib path detection
bash -c '
# Function from install.sh
detect_typelib_path() {
# Try pkg-config first (most reliable)
if command -v pkg-config >/dev/null 2>&1; then
local path=$(pkg-config --variable=typelibdir gobject-introspection-1.0 2>/dev/null)
if [ -n "$path" ] && [ -d "$path" ]; then
echo "$path"
return 0
fi
fi
# Fallback to common distribution-specific paths
for path in \
/usr/lib/x86_64-linux-gnu/girepository-1.0 \
/usr/lib/aarch64-linux-gnu/girepository-1.0 \
/usr/lib/arm-linux-gnueabihf/girepository-1.0 \
/usr/lib/riscv64-linux-gnu/girepository-1.0 \
/usr/lib/powerpc64le-linux-gnu/girepository-1.0 \
/usr/lib/s390x-linux-gnu/girepository-1.0 \
/usr/lib64/girepository-1.0 \
/usr/lib/girepository-1.0 \
/usr/local/lib/girepository-1.0 \
/usr/local/lib64/girepository-1.0; do
if [ -d "$path" ]; then
echo "$path"
return 0
fi
done
# Ultimate fallback
echo "/usr/lib/girepository-1.0"
return 1
}
TYPOB_PATH=$(detect_typelib_path)
echo "Detected typelib path: $TYPOB_PATH"
if [ -d "$TYPOB_PATH" ]; then
echo "✓ Typelib path exists: $TYPOB_PATH"
ls -la "$TYPOB_PATH" | head -5 || true
else
echo "⚠ Typelib path does not exist: $TYPOB_PATH (may be OK if pkg-config not available)"
fi
'
# ============================================================================
# TEST 4: Check install.sh syntax
# ============================================================================
- name: Check install.sh syntax
run: |
echo "=== Checking install.sh Syntax ==="
bash -n install.sh
echo "✓ install.sh: Syntax OK"
# ============================================================================
# TEST 5: Run the dependency checker
# ============================================================================
- name: Run dependency checker
run: |
echo "=== Running Dependency Checker ==="
bash scripts/check-system-deps.sh || echo "⚠ Some dependencies missing (expected in container)"
continue-on-error: true
# ============================================================================
# TEST 6: Test installer help command
# ============================================================================
- name: Test installer --help
run: |
echo "=== Testing Installer --help ==="
bash install.sh --help || true
# ============================================================================
# TEST 7: Test minimal install (venv setup only)
# ============================================================================
- name: Test minimal installer (dry-run venv setup)
run: |
echo "=== Testing Minimal Installer (venv setup) ==="
# Install minimal dependencies needed for venv creation
if command -v apt-get >/dev/null 2>&1; then
apt-get update -qq
apt-get install -y python3-venv python3-pip python3-dev 2>/dev/null || true
elif command -v dnf >/dev/null 2>&1; then
dnf install -y python3-virtualenv python3-pip python3-devel 2>/dev/null || true
fi
# Create a temporary venv to test the flow
python3 -m venv /tmp/test-venv || {
echo "⚠ Could not create venv (may need additional system deps)"
exit 0
}
echo "✓ Virtual environment created successfully"
ls -la /tmp/test-venv/bin/
rm -rf /tmp/test-venv
# ============================================================================
# TEST 8: Test Python import paths
# ============================================================================
- name: Test Python import paths
run: |
echo "=== Testing Python Import Paths ==="
python3 -c "import sys; sys.path.insert(0, 'src'); print('Python path configured')"
python3 --version
echo "✓ Python is available"
# ============================================================================
# SUMMARY: Aggregate results from all container tests
# ============================================================================
summary:
name: Test Summary
runs-on: ubuntu-latest
needs: test
if: always()
steps:
- name: Check test results
run: |
echo "===================================="
echo "Distro Test Matrix Results"
echo "===================================="
echo ""
echo "All container tests have completed."
echo "Check individual job logs for details."
echo ""
echo "Expected behavior:"
echo " ✓ ubuntu:24.04 - Full support expected"
echo " ✓ ubuntu:26.04 - Full support expected"
echo " ✓ debian:12 - Full support expected"
echo " ⚠ fedora:39 - Good support, minor differences expected"
echo ""
echo "Key tests performed:"
echo " 1. /etc/os-release availability"
echo " 2. Distro detection function"
echo " 3. Typelib path detection"
echo " 4. install.sh syntax validation"
echo " 5. Dependency checker"
echo " 6. Installer --help command"
echo " 7. Virtual environment creation"
echo " 8. Python availability"