name: Sanity Check
# What this tests: Code imports without crashing
# What this does NOT test: Real SDR hardware or RF signals
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .
- name: Sanity check - imports
run: |
python -c "
# Test all core imports work
from sdr_mcp.server import SDRMCPServer
from sdr_mcp.hardware.rtlsdr import RTLSDRDevice
from sdr_mcp.hardware.hackrf import HackRFDevice
from sdr_mcp.analysis.spectrum import SpectrumAnalyzer, SignalRecorder, AudioRecorder
from sdr_mcp.decoders.pocsag import POCSAGDecoder
from sdr_mcp.decoders.ais import AISDecoder
from sdr_mcp.decoders.noaa_apt import NOAAAPTDecoder
print('✅ All imports successful')
"
- name: Sanity check - server initialization
run: |
python -c "
from sdr_mcp.server import SDRMCPServer
server = SDRMCPServer()
assert server.server.name == 'sdr-mcp'
assert server.sdr is None # No hardware connected
print('✅ Server initializes without hardware')
"
- name: Sanity check - decoders instantiate
run: |
python -c "
from sdr_mcp.server import ADSBDecoder, POCSAGDecoder, AISDecoder, NOAAAPTDecoder
adsb = ADSBDecoder()
pocsag = POCSAGDecoder()
ais = AISDecoder()
noaa = NOAAAPTDecoder()
print('✅ All decoders instantiate')
"
- name: Sanity check - audio recorder
run: |
python -c "
from sdr_mcp.analysis.spectrum import AudioRecorder
recorder = AudioRecorder()
assert recorder.audio_rate == 48000
assert recorder.base_path == '/tmp/sdr_recordings'
print('✅ AudioRecorder initializes')
"