From 3855aeda0d8216d99c850359d79f12212e4efe83 Mon Sep 17 00:00:00 2001 From: Meliox Date: Sun, 7 Jun 2026 13:32:41 +0200 Subject: [PATCH] update test build --- .github/workflows/test.yml | 40 ++++++++++++++++++++++++++++++-------- 1 file changed, 32 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 59f7fbe..09285ba 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,26 +1,50 @@ # .github/workflows/test.yml +name: Test Build + on: push: branches-ignore: - main + workflow_dispatch: + +env: + FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true jobs: test-build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - name: Install build deps - run: sudo apt-get install -y devscripts debhelper + run: sudo apt-get install -y devscripts debhelper build-essential + - name: Build package - run: make build + run: | + make build + ls -la *.deb || (echo "No .deb file produced by make build" && exit 1) + - name: Verify package - run: dpkg-deb --info *.deb && dpkg-deb --contents *.deb + 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 + mkdir -p /usr/share/pve-manager/js + + # Check mock files exist before copying + if [[ ! -f tests/mock/Nodes.pm ]]; then + echo "Missing tests/mock/Nodes.pm - creating minimal mock" + echo "# mock Nodes.pm" > /usr/share/perl5/PVE/API2/Nodes.pm + else + cp tests/mock/Nodes.pm /usr/share/perl5/PVE/API2/Nodes.pm + fi + + sudo dpkg -i *.deb + grep -q 'PVEMod_SensorInfo' /usr/share/perl5/PVE/API2/Nodes.pm \ - || (echo "Patch not applied" && exit 1) \ No newline at end of file + || (echo "ERROR: Sensor patch not applied" && exit 1) + + echo "All checks passed" \ No newline at end of file