-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (41 loc) · 1.39 KB
/
python-app.yml
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
name: Python CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10' # Specify your Python version here
- name: Install dependencies
run: |
python -m pip install --upgrade pip
# Install package in development mode with all dependencies
pip install -e ".[dev]"
# Verify sympy version
python -c "import sympy; print(f'Installed sympy version: {sympy.__version__}')"
# Verify our compatibility layer is available
python -c "from alphamath.compat import base_solution_linear; print('Compatibility layer available')"
# Get mathematics_dataset package location
SITE_PACKAGES=$(python -c "import site; print(site.getsitepackages()[0])")
# Apply patch to mathematics_dataset
cd $SITE_PACKAGES && \
patch -p1 < $GITHUB_WORKSPACE/patches/mathematics_dataset_sympy_compat.patch || exit 1
cd $GITHUB_WORKSPACE
- name: Run tests
run: |
python -m pytest
- name: Upload test results
uses: actions/upload-artifact@v4
with:
name: test-results
path: pytest-results.xml