-
Notifications
You must be signed in to change notification settings - Fork 2
58 lines (48 loc) · 1.48 KB
/
Copy pathbasic-checks.yml
File metadata and controls
58 lines (48 loc) · 1.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# 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