Use integrated field rotation exposure limit #80
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
| # Filename: .github/workflows/basic-checks.yml | |
| # Objective: Verify syntax, headers, and lightweight regression tests on push/PR. | |
| name: basic-checks | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| checks: | |
| name: Syntax and regression checks | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.11", "3.12", "3.13"] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| - name: Check syntax on tracked Python files | |
| run: python -m py_compile $(git ls-files '*.py') | |
| - name: Verify Garmt headers present | |
| run: | | |
| echo "Checking Garmt headers (Filename / Version / Objective)..." | |
| failed=0 | |
| while IFS= read -r f; do | |
| if ! head -10 "$f" | grep -q "Filename:"; then | |
| echo "MISSING Garmt header: $f" | |
| failed=1 | |
| fi | |
| done < <(git ls-files '*.py' | grep -v '__init__') | |
| if [ "$failed" -eq 1 ]; then | |
| echo "One or more files missing Garmt header." | |
| exit 1 | |
| fi | |
| echo "All headers present." | |
| - name: Run regression tests | |
| run: | | |
| for t in dev/test_*.py; do | |
| echo "Running $t" | |
| python "$t" | |
| done |