update test build
This commit is contained in:
parent
7115dc8e9a
commit
3855aeda0d
40
.github/workflows/test.yml
vendored
40
.github/workflows/test.yml
vendored
@ -1,26 +1,50 @@
|
|||||||
# .github/workflows/test.yml
|
# .github/workflows/test.yml
|
||||||
|
name: Test Build
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches-ignore:
|
branches-ignore:
|
||||||
- main
|
- main
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
env:
|
||||||
|
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test-build:
|
test-build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install build deps
|
- 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
|
- 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
|
- name: Verify package
|
||||||
run: dpkg-deb --info *.deb && dpkg-deb --contents *.deb
|
run: |
|
||||||
|
dpkg-deb --info *.deb
|
||||||
|
dpkg-deb --contents *.deb
|
||||||
|
|
||||||
- name: Test install
|
- name: Test install
|
||||||
run: |
|
run: |
|
||||||
# Mock the system files the patches target
|
|
||||||
mkdir -p /usr/share/perl5/PVE/API2
|
mkdir -p /usr/share/perl5/PVE/API2
|
||||||
cp tests/mock/Nodes.pm /usr/share/perl5/PVE/API2/Nodes.pm
|
mkdir -p /usr/share/pve-manager/js
|
||||||
dpkg -i *.deb
|
|
||||||
# Verify patches were applied
|
# 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 \
|
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