Conversation
seisman
commented
Nov 2, 2025
seisman
commented
Nov 2, 2025
| DAGSHUB_TOKEN: ${{ secrets.DAGSHUB_TOKEN }} | ||
|
|
||
| - name: Download DVC cache as artifacts from GitHub | ||
| if: steps.dvc-pull.outcome == 'failure' |
Member
Author
There was a problem hiding this comment.
seisman
commented
Nov 2, 2025
weiji14
approved these changes
Nov 2, 2025
Member
weiji14
left a comment
There was a problem hiding this comment.
Thank you! Just a couple of suggestions.
| permissions: {} | ||
|
|
||
| jobs: | ||
| dvc_cache: |
Member
There was a problem hiding this comment.
Could probably this as a separate job under .github/workflows/cache_data.yaml if want to reduce the number of workflow files.
Member
Author
There was a problem hiding this comment.
These two jobs have different trigger conditions. The cache_data workflow is usually scheduled to run weekly but the cache_dvc workflow needs to run when .dvc files change.
Member
There was a problem hiding this comment.
Ah yes, ok to keep them separate then.
Co-authored-by: Wei Ji <23487320+weiji14@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For new contributors, it's frustrating to see that so mamy workflows fail due to the DVC issue reported in #4147.
This PR adds a workflow for this issue. It adds a new workflow
cache_dvc.yamlwhich pulls the baseline images from DagsHub and uploads the.dvc/cachefile as GitHub artifacts.For PRs from forks, the
dvc pullcommand fails, so we can download the dvc cache from the GitHub artifact.Below are workflows that use
dvc pulland may fail:ci_tests_dev.yamlci_tests_dev.yaml: The cache won't work in this workflow, since the dvc cache reflect baseline images in the main branch, but this workflow needs baseline images in both the main and the current branch. But it's unlikely that PRs from new contributors will trigger this workflow, since they can't do 'dvc push' either. So no need to apply the workarounddvc-diff.yaml: Doesn't run in PRs, so no need to apply the workaroundrelease-baseline-images.ymlTests
.dvc/cachedirectory was uploaded https://github.com/GenericMappingTools/pygmt/actions/runs/19008233397?pr=4184dvc pullcommand succeeds (https://github.com/GenericMappingTools/pygmt/actions/runs/19008233364/job/54285305945?pr=4184)