@@ -87,28 +87,45 @@ outputs:
87
87
runs :
88
88
using : composite
89
89
steps :
90
- # Set up Python with pip caching
91
90
- name : Set up Python environment
92
91
uses : actions/setup-python@v5
93
92
with :
94
93
python-version : ${{ inputs.python-version }}
95
- cache : pip # Enable pip caching
96
- cache-dependency-path : pyproject.toml
97
94
98
- # Create and configure virtual environment
95
+ - name : Configure pip cache
96
+ shell : bash
97
+ run : |
98
+ CACHE_DIR="/opt/github/cache/pip"
99
+
100
+ # Ensure cache directory exists and is writable
101
+ sudo mkdir -p $CACHE_DIR
102
+ sudo chmod 777 $CACHE_DIR
103
+
104
+ # Configure pip to use the persistent cache
105
+ pip config set global.cache-dir $CACHE_DIR
106
+
107
+ # Display cache info
108
+ echo "Using pip cache directory: $(pip cache dir)"
109
+ echo "Current cache size: $(du -sh $CACHE_DIR 2>/dev/null || echo 'Empty')"
110
+
99
111
- name : Configure virtual environment
100
112
id : setup-venv
101
113
shell : bash
102
114
run : |
103
- # Create isolated test environment
115
+ # Create and activate venv
104
116
python -m venv .venv
105
117
source .venv/bin/activate
106
- # Install dependencies with dev extras
118
+
119
+ # Upgrade pip
107
120
python -m pip install --upgrade pip
108
- pip install ".[dev]"
121
+
122
+ # Install dependencies using the persistent cache
123
+ pip install --prefer-binary ".[dev]"
109
124
pip install codecov
110
125
111
- # Determine which tests to run based on input
126
+ # Show installed packages for debugging
127
+ pip list
128
+
112
129
- name : Determine test scope
113
130
id : test-scope
114
131
shell : bash
0 commit comments