@@ -151,7 +151,7 @@ jobs:
151151 GH_TOKEN : ${{ github.token }}
152152
153153 - name : Install uv
154- uses : astral-sh/setup-uv@3259c6206f993105e3a61b142c2d97bf4b9ef83d # v7.1.0
154+ uses : astral-sh/setup-uv@85856786d1ce8acfbcc2f13a5f3fbd6b938f9f41 # v7.1.2
155155 with :
156156 activate-environment : true
157157 python-version : ${{ matrix.python-version }}
@@ -163,12 +163,23 @@ jobs:
163163
164164 # Pull baseline image data from dvc remote (DAGsHub)
165165 - name : Pull baseline image data from dvc remote
166+ id : dvc-pull
167+ continue-on-error : true
166168 run : |
167169 uv run dvc remote modify upstream url https://${DAGSHUB_TOKEN}@dagshub.com/GenericMappingTools/pygmt.dvc --local
168170 uv run dvc pull --no-run-cache --verbose && ls -lhR pygmt/tests/baseline/
169171 env :
170172 DAGSHUB_TOKEN : ${{ secrets.DAGSHUB_TOKEN }}
171173
174+ - name : Download DVC cache as artifacts from GitHub
175+ if : steps.dvc-pull.outcome == 'failure'
176+ run : |
177+ rm -rvf .dvc/cache/
178+ gh run download --name dvc-cache --dir .dvc/cache/
179+ uv run dvc checkout --verbose
180+ env :
181+ GH_TOKEN : ${{ github.token }}
182+
172183 # Install the package that we want to test
173184 - name : Install the package
174185 run : make install
@@ -179,7 +190,7 @@ jobs:
179190
180191 # Upload diff images on test failure
181192 - name : Upload diff images if any test fails
182- uses : actions/upload-artifact@v4.6.2
193+ uses : actions/upload-artifact@v5.0.0
183194 if : failure()
184195 with :
185196 name : artifact-${{ matrix.os }}-${{ matrix.python-version }}
0 commit comments