-
Notifications
You must be signed in to change notification settings - Fork 221
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Testthat snapshots not uploading #871
Comments
If you look at the check artifacts you'll see that there is no |
Thanks. I fixed my path issue and can now see my snapshots inside the results artifact: https://github.com/FredHutch/VISCtemplates/actions/runs/9701659385/job/26775775183?pr=168 However, I expected to be getting a snapshots artifact, but am still only getting the results artifact. I think the problem is that with the current yaml, it's not possible to get a snapshots artifact when there is a test failure in the earlier block. Compare the actions/check-r-package/action.yaml Line 69 in fbafc3b
actions/check-r-package/action.yaml Line 62 in fbafc3b
The results artifacts upload allows for running that block on failure of a previous block, but the snapshots upload just won't run if there's an earlier failure. The CI runs for the two commits at FredHutch/VISCtemplates#169 demonstrate this. f962f4d uploads snapshots with no test failures, and 0e07004 doesn't upload snapshots. The only change is forcing a test to fail. Are you amenable to a PR that adjusts the arguments/documentation/logic for snapshots artifact upload to be like the logic for the results artifact upload? This would allow the flexibility to upload a snapshots artifact even when tests fail. |
I am not sure if it is a good idea to upload snapshots after test failures, because if a test fails, the rest of the snapshots in the same test block are not recorded. Nevertheless I added an options for this. |
This issue has been automatically locked. If you believe you have found a related problem, please file a new issue and include a link to this issue |
Describe the bug
I'm using these settings in my yaml, hoping to upload my testthat snapshot files to a GitHub artifact:
But these get uploaded instead of the snapshots:
To Reproduce
https://github.com/FredHutch/VISCtemplates/actions/runs/9690680996/job/26740916919
FredHutch/VISCtemplates#168
Expected behavior
I expected the testthat snapshots to get uploaded to a GHA artifact.
Additional context
There are no original comparison snapshots, i.e. the snapshots are being created from scratch. The _snaps folder is .gitignored and .Rbuildignored. The R CMD check and test results are the same locally and on GHA.
The text was updated successfully, but these errors were encountered: