Merge pull request #3 from autoMBD/2-re-org-the-repo #3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Basic CI (no MATLAB required) | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| basic-checks: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.10' | |
| - name: SPDX / license header check (.m files) | |
| run: | | |
| python3 tools/test_check_spdx.py || exit $? | |
| - name: Detect large files (>10MB) | |
| run: | | |
| echo "Searching for files larger than 10MB..." | |
| big=$(git ls-files -z | xargs -0 -I{} bash -c 'f="{}"; s=$(stat -c%s "$f" 2>/dev/null || echo 0); if [ "$s" -gt $((10*1024*1024)) ]; then echo "$f|$s"; fi' || true) | |
| if [ -n "$big" ]; then | |
| echo "Found large files (name|size):" | |
| echo "$big" | |
| echo "Please avoid committing large binaries. Consider using git-lfs or remove them." | |
| exit 1 | |
| else | |
| echo "No large files found." | |
| fi | |
| - name: Run Python tests if present | |
| run: | | |
| if [ -d "tests" ]; then | |
| if [ -f "requirements-dev.txt" ]; then | |
| python -m pip install --upgrade pip | |
| python -m pip install -r requirements-dev.txt | |
| fi | |
| pytest -q || { echo "pytest failed"; exit 1; } | |
| else | |
| echo "No tests/ directory found, skipping pytest." | |
| fi |