update test build
This commit is contained in:
parent
7115dc8e9a
commit
3855aeda0d
38
.github/workflows/test.yml
vendored
38
.github/workflows/test.yml
vendored
@ -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
|
||||
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
|
||||
dpkg -i *.deb
|
||||
# Verify patches were applied
|
||||
fi
|
||||
|
||||
sudo dpkg -i *.deb
|
||||
|
||||
grep -q 'PVEMod_SensorInfo' /usr/share/perl5/PVE/API2/Nodes.pm \
|
||||
|| (echo "Patch not applied" && exit 1)
|
||||
|| (echo "ERROR: Sensor patch not applied" && exit 1)
|
||||
|
||||
echo "All checks passed"
|
||||
Loading…
Reference in New Issue
Block a user