Skip to content

Commit 75480a8

Browse files
authored
Merge pull request #83 from ElectronicCats/WiFiSpectrumSuite
WiFiSpectrumSuite
2 parents bcbde2f + 2d38d36 commit 75480a8

31 files changed

Lines changed: 5422 additions & 0 deletions

.github/workflows/tests.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: Minino - WiFi Spectrum Suite Unit Tests
2+
3+
on:
4+
push:
5+
branches: ["main", "WiFiSpectrumSuite"]
6+
paths:
7+
- "tools/WiFiSpectrumSuite/**"
8+
- ".github/workflows/tests.yml"
9+
pull_request:
10+
branches: ["main", "WiFiSpectrumSuite"]
11+
paths:
12+
- "tools/WiFiSpectrumSuite/**"
13+
- ".github/workflows/tests.yml"
14+
15+
jobs:
16+
test:
17+
name: Test (Python ${{ matrix.python-version }})
18+
runs-on: ubuntu-latest
19+
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
python-version: [3.12, 3.13, 3.14]
24+
25+
defaults:
26+
run:
27+
working-directory: tools/WiFiSpectrumSuite
28+
29+
steps:
30+
# ── 1. Clone the repository ──────────────────────────────────────────
31+
- name: Checkout code
32+
uses: actions/checkout@v4
33+
34+
# ── 2. Configure Python ──────────────────────────────────────────────
35+
- name: Set up Python ${{ matrix.python-version }}
36+
uses: actions/setup-python@v5
37+
with:
38+
python-version: ${{ matrix.python-version }}
39+
cache: "pip"
40+
cache-dependency-path: tools/WiFiSpectrumSuite/requirements.txt
41+
42+
# ── 3. Install dependencies ──────────────────────────────────────────
43+
- name: Install dependencies
44+
run: |
45+
python -m pip install --upgrade pip
46+
pip install pytest pytest-cov
47+
# Verify if requirements.txt exists before trying to install it
48+
if [ -f requirements.txt ]; then
49+
pip install -r requirements.txt
50+
else
51+
echo "requirements.txt not found, continuing without it..."
52+
fi
53+
54+
# ── 4. Run tests ──────────────────────────────────────────────────────
55+
- name: Run tests
56+
run: |
57+
# Verify if the tests directory exists
58+
if [ -d tests ]; then
59+
pytest tests/ \
60+
--cov=modules \
61+
--cov-report=term-missing \
62+
--cov-report=xml \
63+
-v
64+
else
65+
echo "Directory 'tests/' not found"
66+
exit 1
67+
fi
68+
69+
# ── 5. Upload coverage to Codecov ───────────────────────────
70+
- name: Upload coverage to Codecov
71+
uses: codecov/codecov-action@v4
72+
if: matrix.python-version == '3.12'
73+
with:
74+
files: tools/WiFiSpectrumSuite/coverage.xml
75+
flags: WiFiSpectrumSuite
76+
fail_ci_if_error: false

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,7 @@ minino-all-pos.csv
5757

5858
# Gerber
5959
/**/MININO_GERBER
60+
61+
# Python Cache
62+
__pycache__/
63+
*.pyc

tools/WiFiSpectrumSuite/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
generatedFiles/
2+
*.csv

0 commit comments

Comments
 (0)