particle-os-tools/.forgejo/workflows/test-compile.yml
robojerk 29b9675689
Some checks failed
Compile apt-layer / compile (push) Failing after 2s
fixed paths, created ci/cd workflow
2025-07-14 14:22:06 -07:00

63 lines
No EOL
1.7 KiB
YAML

name: Test apt-layer Compilation
on:
workflow_dispatch: # Manual trigger only
jobs:
test-compile:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up environment
run: |
echo "Setting up test environment..."
sudo apt-get update
sudo apt-get install -y jq dos2unix bash
- name: Make compile script executable
run: |
chmod +x src/apt-layer/compile.sh
- name: Test compilation
run: |
echo "Testing apt-layer compilation..."
cd src/apt-layer
./compile.sh -o ../../apt-layer-test.sh
- name: Verify test compilation
run: |
echo "Verifying test compilation..."
if [[ ! -f apt-layer-test.sh ]]; then
echo "❌ Test compilation failed"
exit 1
fi
if bash -n apt-layer-test.sh; then
echo "✅ Test compilation syntax validation passed"
else
echo "❌ Test compilation syntax validation failed"
exit 1
fi
echo "📦 Test script size: $(du -h apt-layer-test.sh | cut -f1)"
echo "📄 Test script lines: $(wc -l < apt-layer-test.sh)"
- name: Test basic functionality
run: |
echo "Testing basic functionality..."
if ./apt-layer-test.sh --help > /dev/null 2>&1; then
echo "✅ Test script help command works"
else
echo "❌ Test script help command failed"
exit 1
fi
- name: Upload test script
uses: actions/upload-artifact@v4
with:
name: apt-layer-test
path: apt-layer-test.sh
retention-days: 7