test workflow

This commit is contained in:
Meliox 2026-06-07 13:19:57 +02:00
parent a7cef62574
commit 46c7f5fe1f
2 changed files with 27 additions and 0 deletions

View File

@ -6,6 +6,7 @@ name: Build and Release
on: on:
push: push:
branches: branches:
- deb-installer
- main - main
paths: paths:
- 'debian/changelog' - 'debian/changelog'

26
.github/workflows/test.yml vendored Normal file
View File

@ -0,0 +1,26 @@
# .github/workflows/test.yml
on:
push:
branches-ignore:
- main
jobs:
test-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install build deps
run: sudo apt-get install -y devscripts debhelper
- name: Build package
run: make build
- name: Verify package
run: dpkg-deb --info *.deb && dpkg-deb --contents *.deb
- name: Test install
run: |
# Mock the system files the patches target
mkdir -p /usr/share/perl5/PVE/API2
cp tests/mock/Nodes.pm /usr/share/perl5/PVE/API2/Nodes.pm
dpkg -i *.deb
# Verify patches were applied
grep -q 'PVEMod_SensorInfo' /usr/share/perl5/PVE/API2/Nodes.pm \
|| (echo "Patch not applied" && exit 1)