-
Notifications
You must be signed in to change notification settings - Fork 73
64 lines (50 loc) · 1.91 KB
/
Copy pathci.yml
File metadata and controls
64 lines (50 loc) · 1.91 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
name: CI Tests
on: [push, pull_request]
jobs:
test:
name: Test ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-2022]
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.13"
- name: Install Linux dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y zlib1g-dev
- name: Build Windows Libraries
if: runner.os == 'Windows'
uses: ./.github/actions/windows_actions
- name: Install Python dependencies
run: |
pip install cython setuptools numpy narwhals
pip install pandas polars
pip install pytest mypy pytest-mypy-plugins pandas-stubs
# The ReadStat C library (src/) contains strict-aliasing violations
# (e.g. void* <-> readstat_variable_t** casts in readstat_writer.c).
# gcc 13+ at -O2 exploits this UB and optimizes away value-label writes.
# -fno-strict-aliasing disables that assumption while keeping other -O2 opts.
- name: Install package
run: pip install .
env:
CFLAGS: ${{ runner.os == 'Linux' && '-O2 -fno-strict-aliasing' || '' }}
- name: Run basic tests
run: python tests/test_basic.py
- name: Run narwhals pandas tests
run: python tests/test_narwhalified.py --backend=pandas
- name: Run narwhals polars tests
run: python tests/test_narwhalified.py --backend=polars
- name: Run HTTP integration tests
run: python tests/test_http_integration.py
- name: Run runtime type tests
run: python tests/test_runtime_types.py
- name: Run typing tests
run: pytest tests/test_typing.yml --mypy-ini-file=tests/test_mypy_setup.ini