forked from quantopian/pyfolio
-
Notifications
You must be signed in to change notification settings - Fork 1
130 lines (112 loc) · 3.63 KB
/
debug-ci.yml
File metadata and controls
130 lines (112 loc) · 3.63 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
name: Debug CI Issues
on:
workflow_dispatch:
inputs:
os:
description: 'Operating System'
required: true
default: 'ubuntu-latest'
type: choice
options:
- ubuntu-latest
- windows-latest
- macos-latest
python-version:
description: 'Python Version'
required: true
default: '3.11'
type: string
jobs:
debug:
name: Debug on ${{ inputs.os }} - Python ${{ inputs.python-version }}
runs-on: ${{ inputs.os }}
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ inputs.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}
- name: System Information
shell: bash
run: |
echo "=== System Information ==="
echo "OS: ${{ runner.os }}"
echo "Runner: ${{ runner.name }}"
echo "Architecture: $(uname -m)"
python --version
pip --version
echo "Python location: $(which python)"
echo "Pip location: $(which pip)"
- name: Test Network Connectivity
shell: bash
run: |
echo "=== Testing Network Connectivity ==="
# Test GitHub
echo "Testing GitHub..."
curl -I https://github.com || echo "GitHub connection failed"
# Test PyPI
echo "Testing PyPI..."
curl -I https://pypi.org || echo "PyPI connection failed"
# Test Gitee
echo "Testing Gitee..."
curl -I https://gitee.com || echo "Gitee connection failed"
- name: Install Dependencies with Verbose Output
shell: bash
run: |
echo "=== Installing Dependencies ==="
python -m pip install --upgrade pip wheel setuptools
# Install with verbose output
echo "Installing IPython..."
pip install -v --timeout=300 ipython>=7.0.0
echo "Installing empyrical..."
pip install -v --timeout=600 git+https://github.com/cloudQuant/empyrical.git || \
pip install -v --timeout=600 git+https://gitee.com/yunjinqi/empyrical.git
- name: Build Package
run: |
echo "=== Building Package ==="
pip install build
python -m build
ls -la dist/
- name: Install Package
shell: bash
run: |
echo "=== Installing Package ==="
wheel_file=$(ls dist/*.whl | head -n 1)
pip install -v "$wheel_file"
- name: Test Import
run: |
echo "=== Testing Imports ==="
python -c "
import sys
print('Python paths:')
for p in sys.path:
print(f' {p}')
print('\nTrying to import pyfolio...')
try:
import pyfolio
print(f'Success! pyfolio version: {pyfolio.__version__}')
except Exception as e:
print(f'Failed: {e}')
import traceback
traceback.print_exc()
print('\nInstalled packages:')
import subprocess
subprocess.run(['pip', 'list'])
"
- name: Detailed Package Information
if: always()
run: |
echo "=== Package Information ==="
pip show pyfolio || echo "pyfolio not found"
pip show empyrical || echo "empyrical not found"
pip show ipython || echo "ipython not found"
- name: Upload Debug Logs
if: always()
uses: actions/upload-artifact@v4
with:
name: debug-logs-${{ inputs.os }}-${{ inputs.python-version }}
path: |
pip.log
build/
dist/