-
Notifications
You must be signed in to change notification settings - Fork 1
82 lines (67 loc) · 2.05 KB
/
ci.yml
File metadata and controls
82 lines (67 loc) · 2.05 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: CI
on:
push:
branches:
- sam2_refactor
- main
pull_request:
branches:
- sam2_refactor
- main
jobs:
test:
name: Test Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pandas>=2.2.0 numpy>=1.26.0 --only-binary :all:
pip install --no-cache-dir --upgrade "rfi_toolbox @ git+https://github.com/preshanth/rfi_toolbox.git"
pip install -e .[ci]
- name: Run unit tests
run: |
pytest tests/unit -v -m "not requires_casa"
- name: Run integration tests
run: |
pytest tests/integration -v -m "not requires_casa"
code-quality:
name: Code Quality
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install black==24.1.1 ruff==0.1.15 isort==5.13.2
- name: Check formatting with Black
run: |
black --check --line-length=100 src/ tests/
# isort check disabled - pre-commit handles this locally
# - name: Check import sorting with isort
# run: |
# isort --check-only --profile black --line-length=100 src/ tests/
- name: Auto-fix with Ruff
run: |
ruff check --fix src/ tests/
- name: Report remaining Ruff issues (warning only)
continue-on-error: true
run: |
ruff check src/ tests/