3939 uv-${{ runner.os }}-${{ matrix.python-version }}-
4040 uv-${{ runner.os }}-
4141
42+ # Debug: Verify working directory and script existence
43+ - name : Debug working directory and files
44+ if : matrix.deps == 'minimum'
45+ run : |
46+ pwd
47+ ls -la
48+ find . -type f
49+ ls -la scripts/ || echo "scripts/ directory not found"
50+
4251 # Install toml for version extraction
4352 - name : Install toml
4453 if : matrix.deps == 'minimum'
@@ -49,10 +58,10 @@ jobs:
4958 if : matrix.deps == 'minimum'
5059 id : extract-versions
5160 run : |
52- echo "numpy=$(python scripts/extract_version.py numpy)" >> $GITHUB_OUTPUT
53- echo "pandas=$(python scripts/extract_version.py pandas)" >> $GITHUB_OUTPUT
54- echo "scipy=$(python scripts/extract_version.py scipy)" >> $GITHUB_OUTPUT
55- echo "python-dateutil=$(python scripts/extract_version.py python-dateutil)" >> $GITHUB_OUTPUT
61+ echo "numpy=$(python ${{ github.workspace }}/ scripts/extract_version.py numpy)" >> $GITHUB_OUTPUT
62+ echo "pandas=$(python ${{ github.workspace }}/ scripts/extract_version.py pandas)" >> $GITHUB_OUTPUT
63+ echo "scipy=$(python ${{ github.workspace }}/ scripts/extract_version.py scipy)" >> $GITHUB_OUTPUT
64+ echo "python-dateutil=$(python ${{ github.workspace }}/ scripts/extract_version.py python-dateutil)" >> $GITHUB_OUTPUT
5665
5766 - name : Create virtual environment
5867 run : uv venv --python ${{ matrix.python-version }} .venv-${{ matrix.deps }}
@@ -91,12 +100,12 @@ jobs:
91100 . .venv-${{ matrix.deps }}/bin/activate && \
92101 uv run pytest --cov=curo --cov-report=xml tests/ -v
93102
94- # - name: Upload coverage report
95- # if: matrix.deps == 'latest'
96- # uses: codecov/codecov-action@v4
97- # with:
98- # files: ./coverage.xml
99- # token: ${{ secrets.CODECOV_TOKEN }} # Set in GitHub Secrets
103+ # - name: Upload coverage report
104+ # if: matrix.deps == 'latest'
105+ # uses: codecov/codecov-action@v4
106+ # with:
107+ # files: ./coverage.xml
108+ # token: ${{ secrets.CODECOV_TOKEN }}
100109
101110 - name : Minimize uv cache
102111 if : matrix.deps == 'latest'
@@ -118,15 +127,36 @@ jobs:
118127 uses : astral-sh/setup-uv@v7
119128 with :
120129 version : " 0.9.18"
130+ enable-cache : true
131+
132+ # Cache uv dependencies
133+ - name : Restore uv cache
134+ uses : actions/cache@v4
135+ with :
136+ path : ~/.cache/uv
137+ key : uv-${{ runner.os }}-3.11-${{ hashFiles('uv.lock') }}
138+ restore-keys : |
139+ uv-${{ runner.os }}-3.11-
140+ uv-${{ runner.os }}-
141+
142+ - name : Create virtual environment
143+ run : uv venv --python 3.11 .venv-build
121144
122145 - name : Install build dependencies
123- run : uv pip install build
146+ run : |
147+ . .venv-build/bin/activate && \
148+ uv pip install build
124149
125150 - name : Build package
126- run : uv build
151+ run : |
152+ . .venv-build/bin/activate && \
153+ uv build
127154
128155 - name : Upload artifacts
129156 uses : actions/upload-artifact@v4
130157 with :
131158 name : dist
132- path : dist/
159+ path : dist/
160+
161+ - name : Minimize uv cache
162+ run : uv cache prune --ci
0 commit comments